Hi,
I searched for some threads on the subject but I didn't find anything close.
I'm looking for a simple regEx to only keep alphanumeric chracters and dashes and strip the rest.
In the example above the "str" should end up like this: 343343-34443343222
The Regex I'm using will only keep the Alphanumeric characters and not the dashes.
Thanks.
I searched for some threads on the subject but I didn't find anything close.
I'm looking for a simple regEx to only keep alphanumeric chracters and dashes and strip the rest.
Code:
<cfset str = "+{343} 343-34443 34 (@3222)" >
<cfset str_safe = ReReplaceNoCase(str,"[^a-z0-9]+","","ALL") >
In the example above the "str" should end up like this: 343343-34443343222
The Regex I'm using will only keep the Alphanumeric characters and not the dashes.
Thanks.