Sqfixes/sqbugs regexp (was: [BUG] Transcript semaphore)

David Farber dfarber at numenor.com
Fri Oct 12 16:57:06 UTC 2001


:) ok, how about this?

   *^Subject: (\[[^\]]*\])*\[(FIX|ENH|ADD|GOOD|ANN|HACK).*\]

this, at least, would not match "[Q] newbie (was: Re: [BUG][FIX] Bla)" by
forcing the expression to always match the first right square bracket it
comes across.

now as for matching "[unix] [fix]", there appear to be two possible problems.
one is the space between the two tags. you could gobble up extraneous
spaces with after square bracket pairs with

   *^Subject: (\[[^\]]*\][ ]*)*\[(FIX|ENH|ADD|GOOD|ANN|HACK).*\]

the other (potential) problem is case. does procmail do case insensitive
matching? if not, then you'll have to do something like
(FIX|Fix|fix|ENH|Enh|enh... etc. or break out the procmail docs to see if
there is some kind of switch to force it to do case insensitive matching.

better?

david


At 01:06 PM 10/12/01 +0200, you wrote:
>On Thu, 11 Oct 2001, David Farber wrote:
>
>>
>> ok, i'll take a stab...
>>
>>   *^Subject: (\[BUG\])?\[(FIX|ENH|ADD|GOOD|ANN|HACK).*\]
>>
>> it think what's missing here is a more generic optional prefix match. right
>> now, you only match "[BUG]" as a possible prefix to the other tags, but i
>> think what you really want is to match *any* square bracket pairs (like
>> "[UNIX VM]"). so, how about:
>>
>>   *^Subject: (\[.*\])*\[(FIX|ENH|ADD|GOOD|ANN|HACK).*\]
>>
>> just a guess...
>
>Now that would match "[Q] newbie (was: Re: [BUG][FIX] Bla)". But not the
>"[unix] [fix]" example I gave. I think it's not *that* simple, otherwise I
>wouldn't have asked ;-)
>
>But thinking about it, a number of bracketed tags would be something like
>
>	(\[[A-Z -]+\] *)*
>
>so I might try that? Better ideas?
>
>-- Bert
>
>
>
>
--
David Farber
dfarber at numenor.com




More information about the Squeak-dev mailing list