Makes good sense to me...(that's frightening..)

Rick


> -----Original Message-----
> From: Ben Doom [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 08, 2006 10:48 AM
> To: CF-Talk
> Subject: Re: How do I write a Regex for this?
> 
> 
> In Regular Expressions, just like life, there are often about a 
> bazillion ways to do something.  For example, in CF6+, you can identify 
> digits with [0-9], [1234567890], or [[:digit:]].
> 
> In a character class (anything in []) there are odd rules about what 
> needs to be escaped when.  For example, this: [[]] will correctly match 
> square brackets.  However, to add a backslash, you can't just escape the 
> backslash: [\\[]] -- you now need to escape all the special 
> chars: [\\\[\]]
> 
> Weird, eh?
> 
> Anyway, the answer is that in your example, you don't really need t 
> escape the special characters, but it doesn't hurt anything.
> 
> I'm sure tht didn't so muuch clarify things as explain why you're 
> confused, but it's the best I could do on short notice.  :-)
> 
> --Ben
> 
> Rick Faircloth wrote:
> > 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...
> > 
> > Rick
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234634
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