Hello bats,

on Wed, 4. Feb 2004 at 09:30:49 -0800 Januk Aggarwal wrote:

DH>> Why does this regular expression not match?
J> I find it less problematic if I have more subpatterns clearly defined.
J> Try putting each of the OR conditions in a clear subpattern.

I tried this before..
%REGEXPMATCH is still empty and SUBPATT gets also set without "clear"
subpatterns.

Strange.

So, what I want to do is getting the name of the mailinglist (before
the '@'), but for different lists.

This could be done easily with
%SETPATTREGEXP='(tbudl|tbot|otherml)@(thebat\.dutaint\.com|otherml\.com)'

But as this would also match '[EMAIL PROTECTED]' this is not optimal.

The idea in my approach was to have the username part of the ml
address in parenthesis and therefor as the result of %REGEXPMATCH,
regardless of which %SUBPATT number it is..

I extended your test QT:
----->8--------------------------------------------------------
%_Text='[EMAIL PROTECTED]'%-
%_RegExp='((tbudl|tbbeta|tbdev|tbtech|tbot)@thebat\.dutaint\.com)|((test)@test\.de)|((thebat-dt)@lists\.dekadent\.net)'%-
%-
%SetPattRegexp=%_RegExp%-
%RegExpBlindMatch='%_Text'%-
Text: %_Text
RegExpMatch: %RegExpMatch='%_Text'

SubPatt 0 = <%SUBPATT="0">
        1 = <%SUBPATT="1">
        2 = <%SUBPATT="2">
        3 = <%SUBPATT="3">
        4 = <%SUBPATT="4">
        5 = <%SUBPATT="5">
        6 = <%SUBPATT="6">
        7 = <%SUBPATT="7">
        8 = <%SUBPATT="8">
----->8--------------------------------------------------------

which results in:

Text: [EMAIL PROTECTED]
RegExpMatch: 

SubPatt 0 = <[EMAIL PROTECTED]>
        1 = <>
        2 = <>
        3 = <[EMAIL PROTECTED]>
        4 = <test>

        
-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.03 Beta/53 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)


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

Reply via email to