On Mon, 8 Mar 2004, LuKreme wrote:
* ^To:[ ]*\/.*
You realize that that will start MATCH with whatever character is
after the colon and will not skip spaces or tabs, don't you?
I did notice that in the logs, but the resulting $MATCHes are being
used only for the egrep, so it seemed pointless to fix.
Nope. Regular expressions are 'right side greedy'. It will first try for
the valid combination of 'expression in paranethesis occurs ZERO times'
followed by 'any string of any length'. It would only look for the
non-zero length match for the parenthesized test if the right side test
somehow did not match on its own without it.
You want *this* for your test:
* ^To:[ ]*\/[^ ].*
The square brackets containing 'space tab' of course. This way, the
'greedy' right side test finds the *largest* possible string that starts
with a NON-space/tab, then completes the match by looking for an optional
space/tab in front of it. But your MATCH string starts with the first
procmail mailing list