Yep, this is probably the safest bet and produces the expected result. Thanks
-----Original Message----- From: Rob Rohan [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 11:54 AM To: CF-Talk Subject: RE: Regular Expression Help lastly, you could think backwards [^A-Za-z0-9] Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -----Original Message----- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 9:47 AM To: CF-Talk Subject: RE: Regular Expression Help Jeff, definetly use Josh's code - just make sure that the chars you want match the [[:punct:]] char class - from the docs: Matches any punctuation character, that is, one of ! ' # S % & ` ( ) * + , - . / : ; < = > ? @ [ / ] ^ _ { | } ~ ======================================================================= Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Email : [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Joshua Miller [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 06, 2002 11:43 AM > To: CF-Talk > Subject: RE: Regular Expression Help > > > Oh, forgot the space .... use "[[:punct:]]||[[:space:]]" as the RegEX > > Joshua Miller > Head Programmer / IT Manager > Garrison Enterprises Inc. > www.garrisonenterprises.net [EMAIL PROTECTED] > (704) 569-9044 ext. 254 > > > > -----Original Message----- > From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 06, 2002 12:31 PM > To: CF-Talk > Subject: Regular Expression Help > > > I am trying to use a regular expression to change all possible special > characters in a string to underscores because I am trying to use the > string as a variable name. > > Regular expressions are not my specialty and I am running into > problems using some characters in my reReplace function. > > Could somebody offer some suggestions on making this work? > > I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank > space, all with the _ character. > > Thanks > -- Jeff > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm