Bert Freudenberg wrote:
On Thu, 29 Jun 2000, Stephan Rudlof wrote:
Hmm, one problem here - this matches the sqfixes archive procmail regex so the [CANNOT] messages will appear in the archive:
^Subject: \[.*(FIX|ENH|ADD|ANN|GOOD|HACK).*\]
Any idea on improving this reg ex? It must, for example, match "[BUG][FIX]" but not "Re: [FIX]".
-- Bert
- I don't understand the joke here.
It was no joke.
- If there is no joke: Don't you already have the searched reg ex?
The above is the current regex. It unfortunately matches a [CANNOT] tag. It should only match [ANN] or [ANNOUNCE]. I could of course remove the ANN. But there are other problems as well, like the "[BUG] Re: [FIX]" case. I'm not exactly a regex buff.
So my question is: Can anybody come up with a regular expression that matches all of Subject: [ANN] ... Subject: [BUG] [ANN] .... but none of Subject: Re: [ANN] ... Subject: [BUG] Re: [ANN] .... Subject: [CANNOT] ...
were ANN should also allow any of FIX, ENH, ADD, ANN, GOOD, HACK to allow [FIX], [ENHANCEMENT], [ADDON], [ADD-ON], [GOODIE] ...
-- Bert
A first idea (not tested, and there are som variants of reg ex'es): grep with ^Subject: ([BUG])?([(FIX|ENH|ADD|ANN|GOOD|HACK|ADDON|ADD-ON)])+ and then grep --revertMatch with [RE:|Re:|re] .
Greetings,
Stephan
On Thu, 29 Jun 2000, Stephan Rudlof wrote:
A first idea (not tested, and there are som variants of reg ex'es): grep with ^Subject: ([BUG])?([(FIX|ENH|ADD|ANN|GOOD|HACK|ADDON|ADD-ON)])+
This looks good and ...
and then grep --revertMatch with [RE:|Re:|re] .
makes this one unnecessary. I don't care if a re: is in the line, a "[FIX] Re: [BUG]" should be accepted, but "Re: [FIX]" not.
I'll try this one: ^Subject: ([BUG])?[(FIX|ENH|ADD|ANN|GOOD|HACK).*]
which requires either of FIX|ENH|ADD|ANN|GOOD|HACK to be first on the line, optionally preceded by [BUG].
Thanks!
-- Bert
squeak-dev@lists.squeakfoundation.org