reFindNoCase does not return subexpression

Description

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

Environment

I started a lucee server in Commandbox on Windows 10. It says it's Lucee 5.3.4+80

Activity

Show:
Pothys - MitrahSoft
June 26, 2020, 5:10 PM

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

Pothys - MitrahSoft
July 29, 2020, 1:50 AM

I've added a test case for this ticket.

Pull Request: https://github.com/lucee/Lucee/pull/989

Pothys - MitrahSoft
October 21, 2020, 2:43 AM

This issue was fixed in the lucee version 5.3.8.80-SNAPSHOT onwards. And also I added a fixed version.

Pothys - MitrahSoft
November 13, 2020, 12:55 AM

Could you please check this ticket with fixed version and report here back. This issue was solved in fixed version.

Michael Offner
December 12, 2020, 1:03 AM

because we get no other feedback, i assume that issue is fixed

Fixed

Assignee

Michael Offner

Reporter

Bernhard Döbler

Priority

New

Labels

Fix versions