RegEx bug? Different than my expectation and ACF


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?

    writeOutput(arrayToList(reFind("r(test)r", "rtestr", 1, true).match))

Lucee ( 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

ACF (2016+)

Please always state the exact version of Lucee!

1 Like

Added. Lucee

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

1 Like