> I also found out that REreplace(str, "[^a-zA-Z0-9]",
> "","all")
> would achieve the same result but yours seems more elegant (which 
> seems to say just keep {words}), my CF env = cf8 or cf81 for Windows, 
> does your solution have any dependency? 

No dependency. \W [^\w] and [^a-zA-Z0-9] will all work in all CFML 
versions/engines worth worrying about

They are all standard regex constructs.

However, it is worth pointing out that \w has a slightly different meaning 
amongst different regex engines - it means "word character", rather than 
"alphanumeric".

In CFML/rereplace it is treated as [a-zA-Z0-9_] (not the underscore).

However, in some flavours of regex \w will accept accented/etc characters (e.g. 
á ç ÿ ) - so if this code was used in something other than CFML, you might need 
to use the version that explicitly specifies standard letters+digits.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316586
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to