<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">&lt;<a href="mailto:rpjday@crashcourse.ca" target="_blank">rpjday@crashcourse.ca</a>&gt;</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&#39;ve seen variations such as:<br>
<br>
  &quot;dir/dir&quot;<br>
  &quot;dir/dir/&quot;<br>
  &quot;dir/dir/*&quot;<br>
  &quot;.*/dir/dir&quot;<br>
<br>
and so on.  is there an aesthetic preference of any kind?</div></blockquote></div><br><br>It&#39;s just a regular expression, so as long as it matches, we&#39;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, &#39;dir/dir&#39; will also match &#39;foodir/dirbar&#39;, which while an unlikely case, is something you should avoid, and this is what having the leading/trailing slashes helps you avoid. It&#39;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 &quot;anything&quot; — that sounds like a case of someone thinking it&#39;s a glob when it&#39;s actually a regex. further, without a ^ to anchor the end of the expression, there&#39;s no need to match anything past what you&#39;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&#39;d suggest the form of BBMASK = &quot;/dir/dir/&quot; — note the leading and trailing slashes to ensure it doesn&#39;t match anything that doesn&#39;t exactly match those directories.<br>

-- <br>Christopher Larson</div></div>