[Mailman-Users] Trapping posts with no subject, and an apology
Mark Sapiro
msapiro at value.net
Fri Mar 23 02:09:45 CET 2007
Mike Maughan wrote:
>
>I've implemented the recommendations; now all I have to do is decipher your
>regex :))
<snip>
>> $subject:\s*(\(no[_ ]subject\))?\s*$
Ooops! It's wrong. It should be
^subject:\s*(\(no[_ ]subject\))?\s*$
The original wouldn't match anything.
It says:
^ - the start of the line
subject:
\s* - zero or more white space characters
( - beginning of a group (this is why your original try didn't work)
\( - a literal (
no
[_ ] - a single underscore or space (character class)
subject
\) - a literal )
) - end of the group
? - zero or one occurrences of the preceding re, in this case what's
in the parentheses
\s* - zero or more white space characters (doesn't match \n)
$ - the end of the line
--
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list