I've been finding weird characters in user inputted strings are causing cfsearch to display an ugly coldfusion error. is there any way to parse out any characters other than numbers and letters?
<cfset myString = "!@&*()?*@$This is a test 123">
<cfset myString = ReReplace(myString,"[^aA-zZ,^0-9,^ ]","","ALL")>
-- or this will remove the specified characters ---
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.