[Mailman-Developers] Topic regexps

Barry Warsaw barry at python.org
Wed May 24 19:12:21 CEST 2006


On Tue, 2006-05-23 at 08:00 -0700, Mark Sapiro wrote:

> The regexp entry is compiled in re.VERBOSE mode. This can be good, but
> also causes problems as the 'help' doesn't mention this. Further, the
> description says 'Topic keywords, one per line, to match against each
> message.' The implication is if I put
> 
>  one
>  two
>  three
> 
> in the regexp box, that this topic will match keywords 'one', 'two' or
> 'three', but actually it matches only 'onetwothree'.
> 
> I see several ways to address this.
> 
> 1) change the processing of this field to effectively join the lines
> with '|' - presumably this will break existing multiline entries, but
> possibly they (at least ones which already contain '|') can be
> converted.
> 
> 2) do 1) as a list or mm_cfg option which defaults to not doing it.
> 
> 3) change the description and help for the regexp to correctly reflect
> what happens.
> 
> What do others think?

I have a hard time imagining that anyone would enter

one
two
three

and not expect it to match 'one|two|three', so I think I'd opt for 1.
I'm not in favor of yet another configuration variable to control this.
OTOH, I've never really received much feedback on the whole topics
features (thus the dearth of responses to your question ;) so I don't
really have a good sense of how people are using this, if they are at
all.

I'm not sure the verbose interpretation of the text box is the most
useful.  The other option is to use some special prefix character at the
front of the regexp to indicate whether it should be verbose or not.  It
would have to be something that is impossible in the first position, and
it seems like | would be a good choice.  Thus if | were in the first
position, you'd interpret that to mean each line should be joined with |
but if not, then you interpret the entire regexp as a verbose pattern.

Thoughts?
-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/mailman-developers/attachments/20060524/8900ce84/attachment.pgp 


More information about the Mailman-Developers mailing list