> Message: 4
> To: [EMAIL PROTECTED]
> Subject: Re: Regular Expressions in Filters
> Date: 03 Sep 2002 10:56:49 -0500
> From: Tim Legant <[EMAIL PROTECTED]>
> 
> Marcelo Giovanni <[EMAIL PROTECTED]> writes:
> 
> > How i use the Pyton regex modifiers in filter description?
> > 
> > like:
> > 
> > Flag  Meaning  
> > DOTALL, S Make . match any character, including newlines 
> 
> All of these can be set inline in the regular expression.  See this
> page from the Python regular expression documentation.  The syntax is
> described about halfway down the page.
> 
> http://www.python.org/doc/current/lib/re-syntax.html
> 
> For instance, to make the match locale-sensitive, include the string
> '(?L)' in your regular expressions.  This matches no characters, but
> does set the LOCALE flag.
> 
> A couple of notes:  First, TMDA searches are case-insensitve, by
> default.  You can specify the '-case' flag in your filter file to make
> them case-sensitive.  See TMDA's filter sources documentation.
> 
> http://www.tmda.net/filter-sources.html
> 
> Finally, although Python regular expressions may be spaced out over
> several lines, this is because of Python's triple-quoted strings.  The
> TMDA parser does not recognize multiline regular expressions.  If you
> use the VERBOSE flag, you can format the expression on one line, to
> make it easier to read, but not across multiple lines.  Be sure to
> surround the regular expression with quotes if you do this.

Tks Tim!

  All i need was the (?s) modifier to search entire body message for 2 or
more 
  keywords...

  Before: body "make(\s|.)*money(\s|.)*fast" drop

  After: body "(?s)make.*money.*fast" drop


M.Giovanni
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to