Strip unwanted characters from a string
Strip all except numbers and letters
<cfset newstr = rereplace(str, "[^A-Za-z0-9]+", "", "all")>
Strip all except numbers
<cfset newstr = rereplace(str, "[^0-9]+", "", "all")>
Strip all except CAPITAL letters
<cfset newstr = rereplace(str, "[^A-Z]+", "", "all")>
You get the point, this post is just for my own records. I keep forgetting how to do this and now I can look it up on my own blog.. thank god for that!!
2575 viewed | 2 opinion(s) | del.icio.us | Digg it | Tjarko @ 15/01/07 21:39 cet



