Help and humor ... thanks Raymond. As you proabably understand ... by
special I meant punctuation that normally wreaks havoc on data that is
supposed to be either numeric or text without !@#$%^&*()_+=-,.<>/?'";:`~
Joshua Miller
Web Development::Programming
Eagle Technologies Group, Inc.
www.eagletgi.com
[EMAIL PROTECTED]
-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 13, 2001 2:18 PM
To: CF-Talk
Subject: RE: REGEX to strip special characters
What do you mean by special? I think R is special, but that's just me.
;)
Here are some regex char classes that might meet what you need:
Character Class Matches
alpha
Matches any letter. Same as [A-Za-z].
upper
Matches any uppercase letter. Same as [A-Z].
lower
Matches any lowercase letter. Same as [a-z].
digit
Matches any digit. Same as [0-9].
alnum
Matches any alphanumeric character. Same as [A-Za-z0-9].
xdigit
Matches any hexadecimal digit. Same as [0-9A-Fa-f].
space
Matches a tab, new line, vertical tab, form feed, carriage return, or
space.
print
Matches any printable character.
punct
Matches any punctuation character, that is, one of ! ' # S % & ` ( ) *
+ , - . / : ; < = > ? @ [ / ] ^ _ { | } ~
graph
Matches any of the characters defined as a printable character except
those defined as part of the space character class.
cntrl
Matches any character not part of the character classes [:upper:],
[:lower:], [:alpha:], [:digit:], [:punct:], [:graph:], [:print:], or
[:xdigit:].
=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
Email : [EMAIL PROTECTED]
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: Joshua Miller [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 13, 2001 1:32 PM
> To: CF-Talk
> Subject: REGEX to strip special characters
>
>
> Anyone know of a REGEX to strip special characters from a string?
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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