On Thu 31-Jul-03 10:08am -0400, daniel hahler wrote:

[Yours (and my modified version) produces]:
on Thu, 31 Jul 2003 16:08:07 +0200 you wrote:

> --+----------------------------
> %SETPATTREGEXP="(?m-s)Date\:\s*(.*)"%REGEXPBLINDMATCH="%HEADERS"
> on %SUBPATT="1" you wrote:
> --+----------------------------

> I don't know what the m and s is for at the beginning, but it works..

(?m) gives you multi-line, so ^ and $ refer to the beginning and end
of lines.  Without it, they refer to the beginning and end of the
whole text (in this case %Headers).  Note, your original doesn't rely
on this option - my modification does.

(?-s) restricts '.' to not include newline characters - so your (.*)
only extends to the end of the line.  This is required here.

For more detail see "Internal Option Setting" under Regex.

> as I'm not used to RegExps, I would like to ask you to give me
> comments about what's wrong or could be done simplier.

The Date field starts must start a line, so replace 'Date' with
'^Date'.

The ':' is not special, so replace '\:' with ':' - not a required
change - just looks better.

The Date: field must be followed by white space, so replace '\s*' with
'\s+'.

You introduce 2 newlines, where only one is likely desirable.
Replace '"%Headers"' with '%Headers"%-'

Combining the above, I'd write:

%SetPattRegExp="(?m-s)^Date:\s+(.*)"%RegExpBlindMatch="%Headers"%-
on %SubPatt="1" you wrote:

Note that for mailing list replies, it's best not to use 'you'.

-- 
Best regards,
Bill


________________________________________________
Current version is 1.62r | "Using TBUDL" information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to