On Wed 31 March 2004, 1:47:20 +1000, Daniel Hahler wrote: > Hello bats, > > on Tue, 30. Mar 2004 at 01:30:45 -0500 rich gregory wrote: > DH>>> %SETPATTREGEXP='(.*?\n)(.*)'%- DH>>> %REGEXPBLINDMATCH(%COOKIE="c:\sigs.txt")%- DH>>> %WRAPPED(%SUBPATT(1)) DH>>> %SUBPATT(2)%- >> It works SOMETIMES! >> Occasionally I get no signature at all with this code. I think the >> failures only occur in single-line entries, those that do not contain >> a \n and citation. > > Yeah, of course. Because without a newline it will never match. > > Change the Regex pattern as follows: > %SETPATTREGEXP='(.*?)(?:\n)?(.*)'%- > > That will make the \n optional and if it gets matched, it won't be > inserted into the %SUBPATT stack, because of the '?:' after the opening > parenthesis.
You might need (and I'm guessing 'cos I haven't tried it) %SETPATTREGEXP='^(.*?)(?:\n)?(.*)$'%- to anchor the pattern to the beginning and end of the subject, otherwise it could match any minimum number of characters with the first part. See Carsten's answer to my similar question at <mid:[EMAIL PROTECTED]> -- Robin Anson Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 ________________________________________________ Current version is 2.04.7 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html

