Just wanted to thank you guys! After three days of reading and a few hours
of trial and error, I set figured out my first Regex, and I _almost_
completely understand it.
I took your original Regex, and was able to redo it to fit my needs:
TEXT:
Greetings from Pay Service!
There is a new bill in your Pay Service Inbox:
DISCOVER CARD in the amount of $606.03.
<snip>
REGEX:
%OSubj
Date: %ODateEn, %OTimeLongEn
%SETPATTREGEXP="(?is).*(^.*in the amount of.*?$)"
%REGEXPBLINDMATCH="%TEXT"
%SUBPATT="1"
%SUBPATT="2"
RESULTS:
New Bill Received
Date: Sunday, January 28, 2001, 4:11:11 PM
DISCOVER CARD in the amount of $606.03.
<yippee!!!>
I will fine tune it further to get all the info, but this was huge step for
me. :)
But one questions still...
I still don't understand entirely what the subpatterns do for me. I've
learned that replacing %REGEXPBLINDMATCH with %REGEXPMATCH allows me to just
remove %SUBPATT="1" AND %SUBPATT="2"
I've got a couple three ideas of what this could possibly be used for, but I
don't quite get it.
If this may help focus an answer, this is what the help file says about
them:
%REGEXPBLINDMATCH=�string� is like %REGEXPMATCH=�string� macro except
matched string/substrings are not returned, they may be further extracted by
%SUBPATT="n" macro where n is a number of captured substring; 0 means text
matching entire regexp pattern, 1 - matching first subpattern, 2 - second
subpattern,. etc.... Thus this %REGEXPBLINDMATCH=�string� macro allows more
then one subpatterns e.g.
%QUOTES="%SETPATTREGEXP=""total_amount +(\S+).*flowers_type
+(\S+)""%REGEXPBLINDMATCH=""%TEXT""pay %SUBPATT=""1"" for %SUBPATT=""2"""
Maybe you could help explain this further?
-josh
--
Best regards,
Silver mailto:[EMAIL PROTECTED]
--
______________________________________________________
Archives : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>
You are subscribed as : [email protected]