I have a simple line of code, a call to reFindNoCase
<cfdump var="#reFindNoCase( "^S(\d\d)$", "S21", 1, true )#">
The result of the call is a struct that contains three members: pos, len and match.
Match is an array. The first element contains the whole match of the regular expression. That is fine.
The second element contains the whole expression, as well. That's wrong. It's supposed to contain the matched subexpression which in the above case is number 21.
I execute the exact line of code on an Adobe ColdFusion 2018 server, which gives the subexpression and not the whole expression.
You can try it here: https://trycf.com/scratch-pad/pastebin?id=HYJNF8mH
I started a lucee server in Commandbox on Windows 10. It says it's Lucee 5.3.4+80
I've checked this ticket with lucee and ACF and confirmed the issue happened on latest version of lucee 5.3.8.12-SNAPSHOT also. The result is incompatible with ACF.
It could be cause of this issue.
https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/regex/Perl5Util.java#L160
I've added a test case for this ticket.
Pull Request: https://github.com/lucee/Lucee/pull/989
This issue was fixed in the lucee version 5.3.8.80-SNAPSHOT onwards. And also I added a fixed version.
Could you please check this ticket with fixed version and report here back. This issue was solved in fixed version.
because we get no other feedback, i assume that issue is fixed