I'm resending this as I haven't had a reply, and I can't find my
previous post in the archives so I assume something went wrong
(although I got a copy back from the list when I sent it).

I've decided to have another go at using the features of TB! to
streamline my work (last time I explored templates, filters and regex
was probably over a year ago). I don't really understand these things,
but I can usually play around and get something to work.

The first problem I've struck this time is how to find alternative
patterns.

Specifically, I get emails where the subject can be
either "Editing job (0000Jobname)" or "0000JobnameEd1". Either subject
may have "Re:" or "Fwd:" at the start, and senders are not always
consistent in capitalisation of "Ed1".

I want to extract 0000Jobname (which is always 4 digits followed by a
single word).

%SETPATTREGEXP="\((.*)\)"%REGEXPMATCH="%OSUBJ" works perfectly for the
first case.
%SETPATTREGEXP="(.*)[Ee][Dd]1"%REGEXPMATCH="%OSUBJ" works perfectly
for the second case.

But I cannot work out how to combine them as alternatives in one
regex. I believe | is the appropriate metacharacter, and I've played
around with it and various combinations of parentheses and %SUBPATT.
In almost every case, the pattern before the | works, but the one
after does not (I've tried swapping positions to check this).

Please tell me how to do this.

-- 
Tim
[EMAIL PROTECTED]
Using The Bat! v1.61 on Windows XP 5.1 Build 2600 


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

Reply via email to