Hello Lars,

An archeological dig discovered that on Tuesday, October 23, 2001 at
17:21 GMT +0200, Lars Geiger [LG] typed the following:

LG> Try the following as QT 'bracket':

LG> bracket:

LG>     
%SETPATREGEXP="(?i)^(\s*?\[.*\])?(\s*?(re|ha|rcpt|fwd)(\[\d*\])?\:\s*?)*(.*))"%-
LG>     %RegExpBlindMatch="%OSubj"%SubPatt="5"

LG> I made all the * ungreedy, changed that %RegExpBlindMatch part as stated
LG> above and it seems to work now.

The only problem with this version is when you get a subject line
like:
[TBUDL] Re: Regexp Question (was: [TBUDL] Re[5]: Where is the off switch?)

The problem is that between the first '[' and the last ']' is the
subject of interest.  But with your regexp, that's what you eliminate.
A better expression would be:

'%SETPATTREGEXP="^((re|ha|rcpt|fwd)(\[\d*\])?\:\s*|\[.*?\]\:?\s*)*(.*)$"%-
%REGEXPBLINDMATCH="%OFullSubj"%-
%SUBPATT="5"'

LG> Not sure what exactly was wrong, though.

His problem was how he had applied the %REGEXPBLINDMATCH macro.  From
Jan's mail:
JR>%RegExpBlindMatch="='%OSubj'"
                     ^^^^^^^^^

The text being matched is:
='[tinyfirewall] Re: TPF v2.0.15 - 100% newbie question'

Now look at his (and your) regexps.  The first thing you look for is
the "[tinyfirewall]", but the string doesn't start with that.  It
starts with "='"

To get the output Jan wants, you have to put the single quotes around
the entire regexp, or at least around the %subpatt macro.

LG> Perhaps someone can lighten me up here? (Januk?) ;-)

<sigh> There are people on this list that know more about regexps
than I do.  No need to single me out.

-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.54/10 under Windows 98 4.10 Build 2222 A

If you've ever noticed, the average traffic cone queue stretches for
miles, and the poor things often wait for hours without progressing
anywhere. Traffic cones have rights, just like people.


-- 
______________________________________________________
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to