Title:
replaceList/replaceListNoCase delimiters causing trouble when subset of regex
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / (Alexander Kwaschny)
Created: 06/14/2016
Components: Language
Versions: 11.0
Failure Type: Incorrectly Functioning
Found In Build/Fixed In Build: CF2016_Update2 /
Priority/Frequency: Normal / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 1
Problem Description:
The delimiter attributes in the replaceList and replaceListNoCase functions cause expression exceptions or unexpected behavior when being a subset of regex special characters such as { ? ( | ) } etc.
Steps to Reproduce:
<cfscript>
x = "abc";
x = replaceListNoCase(x, "a?b?c", "x", "?");
writeDump(x);
</cfscript>
Actual Result:
Exception because the delimiter does not result in a valid expression to use with a regex function.
Expected Result:
Not having to consider regex in replaceList and replaceListNoCase as it is not named reReplaceList/reReplaceListNoCase, right?
Any Workarounds:
Escaping the delimiters that are part of the regex subset.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4164200
External Customer Info:
External Company:
External Customer Name: Alexander Kwaschny
External Customer Email:
External Test Config: Seems to be broken since ColdFusion 11. It does work properly in ColdFusion 10.
Attachments:
Comments: