I need a regular expression to remove all characters from a string that are
NOT in this list:
comma, space, dash, plus, digit, or one of several two-letter codes such
as "NM".
This regular expression works for everything except the two-letter codes:
REReplaceNoCase(TheInput,"[^, -+0-9]","","ALL")>
What I want is something like this (WRONG) expression:
REReplaceNoCase(TheInput,"[^, -+0-9(NM|VF|FN|VG|GD|FR|PR)]","","ALL")>
That expression treats the parentheses, pipes, and letters of the
two-letter codes as single characters. I need to be able to treat the
two-letter codes as a single block. Is this possible with reg expressions,
or I should I just loop over the string and do it myself?
Thanks,
Conan Saunders
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists