RegEx bug? Different than my expectation and ACF

Update

Looks like the difference is simply what Lucee returns in the match array. Is there a reason I’m not thinking of why this might be preferred?

<cfscript>
    writeOutput(arrayToList(reFind("r(test)r", "rtestr", 1, true).match))
</cfscript>

Lucee (5.3.7.48): rtestr,rtestr

ACF (at least CF2016-2021): rtestr,test

I assume Lucee is using a slightly different regex engine than ACF, but this appears to be an incorrect result. Looks like we have a resolution in this case for our needs (actually not sure).


teststr = “test r3291048r”;
writeOutput(arrayToList(reFind(“r(.*?)r”, teststr, 1, true).match));

Lucee 5
r3291048r,r3291048r

ACF (2016+)
r3291048r,3291048

Please always state the exact version of Lucee!

1 Like

Added. Lucee 5.3.7.48

@danielmroberts Yeah, this issue was solved from the lucee version 5.3.8.80-SNAPSHOT onwards. From this version, lucee uses the latest regex engine like ACF. LDEV-2892

1 Like