|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
RegEx Help
Author: Brad Roberts
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24178#121624
I've spent a lot of time on this and can't seem to get it right.
I need a regex that says the following:
Find ANY character (including spaces) other than the following characters:
A-Z, a-z, 0-9, period, and underscore.
The problem with the ones I've created, is the regex would find a letter and
return True, because the letter wasn't a number, period, or underscore. I
need it to find a character that is not any of the charcters listed above.
Anyone care to help?
-Brad
Author: Jerry Johnson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24178#121631
[^A-Za-z0-9\._]
(The ^ in there says "anything but...)
Jerry Johnson
>>> cftalk@becomenew.com 05/22/03 01:35PM >>>
I've spent a lot of time on this and can't seem to get it right.
I need a regex that says the following:
Find ANY character (including spaces) other than the following characters:
A-Z, a-z, 0-9, period, and underscore.
The problem with the ones I've created, is the regex would find a letter and
return True, because the letter wasn't a number, period, or underscore. I
need it to find a character that is not any of the charcters listed above.
Anyone care to help?
-Brad
Author: webguy
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24178#121633
not A-Z, a-z, 0-9, period, and underscore = [^A-Za-z0-9._]
WG
Author: Ben Doom
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24178#121637
The regex would be
[^A-Za-z0-9._]
HTH.
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
:
: Sent: Thursday, May 22, 2003 1:36 PM
: To: CF-Talk
: Subject: RegEx Help
:
:
: I've spent a lot of time on this and can't seem to get it right.
:
: I need a regex that says the following:
: Find ANY character (including spaces) other than the following characters:
: A-Z, a-z, 0-9, period, and underscore.
:
: The problem with the ones I've created, is the regex would find a
: letter and
: return True, because the letter wasn't a number, period, or underscore. I
: need it to find a character that is not any of the charcters listed above.
:
: Anyone care to help?
:
: -Brad
:
:
:
Author: Jerry Johnson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24178#121644
The reason mine was wrong was that I escaped the period when I didn't need to.
Always listen to Ben.
Jerry Johnson
>>> bdoom-hof@moonbow.com 05/22/03 01:51PM >>>
The regex would be
[^A-Za-z0-9._]
HTH.
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
:
: Sent: Thursday, May 22, 2003 1:36 PM
: To: CF-Talk
: Subject: RegEx Help
:
:
: I've spent a lot of time on this and can't seem to get it right.
:
: I need a regex that says the following:
: Find ANY character (including spaces) other than the following characters:
: A-Z, a-z, 0-9, period, and underscore.
:
: The problem with the ones I've created, is the regex would find a
: letter and
: return True, because the letter wasn't a number, period, or underscore. I
: need it to find a character that is not any of the charcters listed above.
:
: Anyone care to help?
:
: -Brad
:
:
:
Author: Brad Roberts
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:24178#121654
Awesome! Thanks everyone!
-Brad
----- Excess quoted text cut - see Original Post for more -----
|
May 18, 2013
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||