Using java regex engine incompatibility issue

Description

Using java regex engine doesn't consider the start argument in functions refind()/refindnocase().
https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/regex/JavaRegex.java#L86

<cfscript> writedump(reFindnocase("(f)(oo)", "foo", 3, true).match); // expected [] , But actual ["foo"] </cfscript>

The results of rematchnocase() rereplacenocase() has incompatibility issue. Seems using Perl regex type works fine.

<cfscript> writedump((rematchNoCase("[a-z]+","ONE"))); // expected ["ONE"] , But actual [] writedump((reReplaceNoCase( "ONE 123", "[a-z]+", "", "one" )); // expected 123 , But actual "ONE 123" </cfscript>

Environment

None

Activity

Show:

Pothys - MitrahSoft 9 August 2022 at 08:13
Edited

I've checked this ticket with the fixed versions. Now the reFindnocase(), rematchNoCase() and reReplaceNoCase() returns result as expected with the java regex engine.

Pothys - MitrahSoft 8 April 2022 at 08:26

Pothys - MitrahSoft 26 August 2021 at 13:09

I added a fix to this ticket and also this PR fixes the ticket https://luceeserver.atlassian.net/browse/LDEV-3533

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

Fixed

Details

Assignee

Reporter

Priority

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

Sprint

Affects versions

Created 25 August 2021 at 14:51
Updated 9 August 2022 at 08:18
Resolved 9 August 2022 at 08:13

Flag notifications