* Jernej Simoncic <[EMAIL PROTECTED]> writes:

> %SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%-
> \s*(?:(?:[^:]{0,4}(?:[\[\(]\d+[\]\)])?:)?\s*(?:\[[^\]]*\]\s*)?)*%-
> (.*?)%-
> ([\(\[].+[\)\]])?$/%-
> %RegExpBlindMatch="%OSubj"%-
> %Subject='Re: %SUBPATT="1"%SUBPATT="2"'

Hm, how about using the ?x-option for making the regexp a little
more readable? Here is an example of another subject cleaner that I
once wrote (not saying that this one is better than yours but only
to show how ?x could beautify your code):

--8<---------------cut here---------------start------------->8---
%Subject="Re: %-
%SetPattRegExp='
(?ix)\A:?
(   (\[(.*?|LIST1|LIST2|LIST3)\]) # Listnames
  | (\((.*?|LIST4|LIST5|LIST6)\)) # Listnames
  | ((aw|antw|antwort|fw|fwd|forw|forward| 
      ha|rcpt|re|wg|wtr|betrifft|vs|sv)
    (\[\d*\])?:)       # Reply counters
  | (\s*))*            # This is a comment.
(.*?)(\s*)             # This is a comment.
(   (\(wa(r|s)(:|\s+).*?\))
  | (\[wa(r|s)(:|\s+).*?\])
  | (\(fwd\))
  | (\(pgp.*)
  | (\(s/mime.*)
  | \z)'%-
%RegExpBlindMatch='%OSubj'%-
%SubPatt='10'"%-
--8<---------------cut here---------------end--------------->8---

Carsten
-- 

________________________________________________________

http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to