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 <[EMAIL PROTECTED]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp