Hi all,

Would someone be so kind as to tell me what I'm doing wrong with the
following regex? The following line exists on its own line and I'm
trying to extract the email address following the second colon.  This
is being used in a reply template.

Buyer:                                 somename: [EMAIL PROTECTED]

I constructed this regex

%SETPATTREGEXP='Buyer:(.*:)(\S*)'%REGEXPBLINDMATCH='%text'%SUBPATT='2'

with the following reasoning

The (.*:) should match every character (except a newline) up to and
including the second colon and place the result into SUBPATT 1.  The
(\S*) should match everything after the second colon and place the
result into SUBPATT 2 and "print" it.

The problem is that SUBPATT 2 contains all the information after the
*final* colon in the email.

How can I construct the regex so that it only extracts from a single
line?

Any help (and explanation) would be greatly appreciated.

-- 
Best regards,
 Nick


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

Reply via email to