[Mailman-Users] how to use topics/ for more than one keyword

Mark Sapiro msapiro at value.net
Tue Feb 22 21:18:44 CET 2005


LN Tora wrote:

>Thanks for the reply.  I'll certainly check the links, though I thought I 
>should be a bit clearer.
>
>In your example with black and white, you mentioned if I wanted them in any 
>order.  I think I should have instead asked what about a set of words in a 
>particular order.
>
>Say I have "television comedy"  I want it to match that exactly as it reads. 
>  What would I do then?  Also, am I using quotes in the re box or no?

No quotes.

Ordinarily to match the above with exactly one space, you would use

television comedy

as your re, but in the case of Topics, the re is compiled in IGNORECASE
and VERBOSE mode. IGNORECASE makes it case insensitive which is
normally good. VERBOSE enables certain 'readability' features, one of
which is to ignore certain whitespace in patterns, so the above won't
work. To match with exactly one space, you need

television\ comedy

or

television[ ]comedy

More likely you want any number (>1) of spaces or tabs in which case
you use

television[ \t]+comedy

or for any amount of whitespace

television\s+comedy

--
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