Howard Moscovitz wrote: >In the topic definition form, how can one specify a topic that is only >messages that DOES NOT have the string [G2] in it.
see http://docs.python.org/lib/re-syntax.html I would try ^(?!.*\[G2\]) or if case is not significant ^(?!.*\[[Gg]2\]) but this is only a suggested starting point. It seems to me that it should work, but I don't know. >Is there a way to test regeps without setting up a separte test list? You could do a few interactive tests with Python or make a script. For example: [EMAIL PROTECTED] ~]$ python2.3 Python 2.3.3 (#1, Mar 4 2004, 22:12:33) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> m = re.match('^(?!.*\[G2\])', 'now is the time for [G3] to do something') >>> m.group(0) '' >>> m = re.match('^(?!.*\[G2\])', 'now is the time for [G2] to do something') >>> m.group(0) Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: 'NoneType' object has no attribute 'group' >>> [EMAIL PROTECTED] ~]$ In the first case, the re matches the null character at the beginning of the line which is followed by not (anything followed by [G2]) so the match succeeds and the matched string is null. In the second case, the null character at the start of the string is followed by (anything followed by [G2]) so the match fails and m.group is undefined. -- 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/