On Tue, Apr 03, 2012 at 12:24:54PM +1000, m...@raf.org wrote:
> Cameron Simpson wrote:
> 
> > You need double backslashes because two things are happening.
> > [...snip...]
> 
> the best computing advice i've ever had was:
> 
>   "Double the number of backslashes!"
>   - John Mackin
> 
> he didn't even know what my problem was when he said it but he was right.
> 
> if it doesn't fix your problem, you just haven't doubled the number of
> backslashes enough times. :-)

Along these lines I hit a bug in procmail when specifying a word
boundary regex where the leading \ must be escaped but not the trailing
one.  For example I had a procmail recipe with:

* \<((lib)?krb5?|kerberos|kerberize|(lib)?sasl|(lib)?gss(.api)?)\>

which wasn't working but when I change that to:

* \\<((lib)?krb5?|kerberos|kerberize|(lib)?sasl|(lib)?gss(.api)?)\>

it did proper matching.  It's bad enough trying to understand when and
what to escape but throw in buggy parsing and wait, I think my head just
exploded.

-- 
Will Fiveash

Reply via email to