Originally Posted By: Sherip
Can you demonstrate the failure? This alias seems to work fine. The i makes it case insensitive, in case your tags are actually in upper case.

testaregex {
var %testdata = $str($chr(32),4) $+ <title> $+ $crlf
%testdata = %testdata $+ This is the sentence. $+ $crlf
%testdata = %testdata $+ $str($chr(32),2) $+ </title>
var %pat = /(*ANYCRLF)<title>\s*\K(.+?)(?=\s*<\/title>)/i
echo count= $+ $regex(%testdata, %pat) $+ ;string= $+ $regml(1)
}


don't forget \s matches \r and \n :P \s* is matching those characters between the coloured parentheses:

Quote:

<title>(\r\n)This is the sentence.(\r\n )</title>


the problem therefore arises when 'This is the sentence.' contains a line break


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde