On Tue, Jul 1, 2008 at 10:58 AM, Nathan Stien <<a href="mailto:nathanism@gmail.com">nathanism@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">...<br>
</div>I was surprised to find that not everyone does this. Sometimes you<br>
can't use single quotes because you need to do $VARIABLE substitution,<br>
but not usually in a regex.<br>
<div class="Ih2E3d"></div></blockquote><div><br>Whenever I find myself in this situation, I simply mix single quotes and double quotes (or just the exposed variable):<br><br>grep '\.'$VARIABLE'so'<br> </div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">...<br>
<br>
</div>I have a similar habit, but I use \< and \> to get beginning and<br>
ending word boundaries. Picked that up from hitting * in vim, which<br>
takes the word under the cursor and sets the current search regex to<br>
be '\<foo\>'.<br>
<br>
$ grep '\.so\>'<br>
<div></div></blockquote><div><br><flame on>This is because VIM is the end-all and be-all of editors.</flame no><br><br>Thank you for teaching me something about VIM today.<br><br>Chris<br></div></div>