<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 9, 2013 at 6:09 AM, Robert P. J. Day <span dir="ltr"><<a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":sl"> is there a *preferred* format for setting BBMASK? in my travels,<br>
i've seen variations such as:<br>
<br>
"dir/dir"<br>
"dir/dir/"<br>
"dir/dir/*"<br>
".*/dir/dir"<br>
<br>
and so on. is there an aesthetic preference of any kind?</div></blockquote></div><br><br>It's just a regular expression, so as long as it matches, we're fine, but that said, there are certain things to keep in mind:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">- First, 'dir/dir' will also match 'foodir/dirbar', which while an unlikely case, is something you should avoid, and this is what having the leading/trailing slashes helps you avoid. It's not as unlikely as it seems, also. Consider something like recipes/libfoo/ and recipes/libfoobar/</div>
<div class="gmail_extra">- It uses re.search, not re.match, so the leading .* is unnecessary</div><div class="gmail_extra">- /* will only match a series of slashes, not "anything" — that sounds like a case of someone thinking it's a glob when it's actually a regex. further, without a ^ to anchor the end of the expression, there's no need to match anything past what you're searching for (that is, no need to do something like dir/dir/.*)</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">So given those points, I'd suggest the form of BBMASK = "/dir/dir/" — note the leading and trailing slashes to ensure it doesn't match anything that doesn't exactly match those directories.<br>
-- <br>Christopher Larson</div></div>