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:

Michael Offner 11 December 2020 at 14:03

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

Pothys - MitrahSoft 12 November 2020 at 13:55

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

Pothys - MitrahSoft 20 October 2020 at 15:43

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

Pothys - MitrahSoft 28 July 2020 at 15:50

I've added a test case for this ticket.

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

Pothys - MitrahSoft 26 June 2020 at 07:10

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

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 25 June 2020 at 21:53
Updated 2 July 2021 at 09:57
Resolved 11 December 2020 at 14:04

Flag notifications