Normally you do have to escape those characters in a regex, but in a
character class they aren't special characters (but there are other
special characters in character classes, like '^').  You've probably
picked this up from the other posts, but a character class is anything
in [].

> -----Original Message-----
> From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 08, 2006 8:24 AM
> To: CF-Talk
> Subject: RE: How do I write a Regex for this?
> 
> Hmmm..I'm getting conflicting info from the list...
> 
> One said to escape the characters... \.\$, (don't
> know why the comma wasn't escaped...perhaps
> it isn't "special"...(now it's sad because it's not "special"... ;o)
> 
> Another said they don't need to be escaped...
> 
> You're coming down on the escape side...
> 
> would it be REReplace(string, "[\.\$,]", "", "All")
> or
> would it be REReplace(string, "[\.\$\,]", "", "All")
> 
> ?
> 
> Just for the record, I implemented it without the
> escapes yesterday and it seems to be performing correctly...

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234615
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to