The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl the SLANG EXTENSION and Guest Programming >> Bug Reports for Slangmgh >> RegEx, predefined classe \b (wordboundary) http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1258634496 Message started by JohnSmith on 11/19/09 at 06:41:36 |
Title: RegEx, predefined classe \b (wordboundary) Post by JohnSmith on 11/19/09 at 06:41:36 Just have noticed that in regex expression (EccoExt v4.0.0.5) , predefined classe \b don't work, a \\b is required to make it work. e.g. rule function match('checking RegEx','\bReg') returns empty string to make it work use '\\b' instead of '\b', e.g. match('checking RegEx','\\bReg') returns 'Reg'. Best Regards, JS |
Title: Re: RegEx, predefined classe \b (wordboundary) Post by Admin on 11/19/09 at 15:54:12 this is (at least in part) due to the regex engine itself. 1. can use \B in place of \b (which is as Regex technically backwards, \B should be NOT a boundary ... but then again...) 2. double slash "\\" is interpreted as single slash. (if you *want* double slash, eg., literal slash, must use four slashes, "\\\\" (untested if issue 2 is local extension or regex engine issue) |
The eccoMAGIC Forums » Powered by YaBB 2.1! YaBB © 2000-2005. All Rights Reserved. |