On Tue, 8 Oct 2002 10:15:35 -0400
Nick <[EMAIL PROTECTED]> wrote:

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

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

More secure in what you get will nevertheless be:

%SETPATTREGEXP='(?s)^Buyer:(.*?):.*?(\S+)$'%REGEXPBLINDMATCH='%text'%-
$SUBPATT='2'

If you really only need what %SUBPATT='2' gives it can be simplified to

%SETPATTREGEXP='(?s)^Buyer:.*?:.*?(\S+)$'%REGEXPMATCH='%text'

Disclaimer: all this is 'untested' and 'from memory', albeit it should
be (at most) correctly you should do intensive tests with several
patterns to make sure results are as expected.
-- 
Pit

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

Reply via email to