Rob, I think you are correct. Putting a "-" in will work also (at least in the Regex Coach program). However, "\-" also works, and it makes me feel more comfortable to know that it is being escaped... But yes, both will work.
....................... Ben Nadel www.bennadel.com -----Original Message----- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Thursday, May 11, 2006 11:44 AM To: CF-Talk Subject: Re: Regex Dash Just placing the dash at the beginning or end of the character class should be sufficient. Otherwise the dash is considered a range delimiter. [-_A-Z] will handle dashes [_a-z-] will also handle them I believe the backslash in a character class is, literally, a backslash in Ben's example and does not affect the dash at all. I say that without doing an actual test, however. :-) Or maybe I misunderstood what you were asking? On 5/11/06, Ben Nadel <[EMAIL PROTECTED]> wrote: > Yeah, since you are not using "\-" in the [] matching group, it should > be replaced out. If you want to keep the "-", add "\-" to the end of the group: > > REReplaceNoCase(acc_number,"[^a-zA-Z[:space:]'0-9_&:,!()/\-]","","ALL" > ) > > > ....................... > Ben Nadel > www.bennadel.com > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 11, 2006 11:03 AM > To: CF-Talk > Subject: Regex Dash > > Is there a remove dash(-) element in this statement? > > REReplaceNoCase(acc_number,"[^a-zA-Z[:space:]'0-9_&:,!()/]","","ALL") > > > Lee Surma > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240223 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

