Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: _agx_Posted on 2007-08-21 at 10:51:41ID: 19739939
One option would be to use the character classes. But it depends on which punctuation characters you accept. You can view a description of the classes here. Its an old link but the description seems better than the more recent MX7 documentation. coldfusion /5.0/ Devel oping_Cold Fusion_App lications/ regexp3.ht m
punct:]])" , "", "all")>
"", "all")>
http://livedocs.adobe.com/
<cfset yourText = "#chr(28)#here"& '"there" and'& "~ everywhere #chr(30)# {else, 'blah', 'blah', blah! }">
<cfset newText = reReplace(yourText, "([^[:alnum:]|[:blank:]|[:
<cfoutput>
yourText: #yourText#<br>
newText: #newText#
</cfoutput>
Another option might be something like this (NOT TESTED)
<cfset yourText = "#chr(28)#here"& '"there" and'& "~ everywhere #chr(30)# {else, 'blah', 'blah', blah! }">
<cfset newText = reReplace(yourText, "[^#chr(32)#-#chr(122)#]",
<cfoutput>
yourText: #yourText#<br>
newText: #newText#
</cfoutput>