You will need to escape SOME of them.
All of those will need to be escaped when literally trying to match them
+ * ? . [ ^ $ ( ) { | \
There is also a [:punct:] that matches all of these characters
! ' # S % & ` ( ) * + , - . / : ; < = > ? @ [ / ] ^ _ { | } ~
Are you trying to match the EXACT pattern of @#$^_* or just any of them?
To match the sequence:
@#\$\^_\*
To match just 1 of them
@|#|\$|\^|_|\*
As for books, Ben Forta's Teach yourself regular expressions in 10 minutes
is a quick, easy to follow crash course as well as decent reference when
your mind draws a blank.
-----Original Message-----
From: Steve LaBadie [mailto:[EMAIL PROTECTED]
Sent: Monday, February 12, 2007 8:29 AM
To: CF-Talk
Subject: Regex Help
I have been playing around with some regex patterns and have run into a
snag. One issue the regex works differently in IE6 and Firefox. I
didn't know the regex would behave differently in these browsers. The
main issue is validating the use of character class (@#$^_*). Do I need
to escape these? I have tried several ways of setting up the regex. I
get an "Invalid CFML construct found" error.
^(?=.*[A-Za-z])(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*[^A-Za-z0-9])(?=.*[
@#$^_*])(?!.*s).{8,127}$
^(?=.*[A-Za-z])(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])([EMAIL PROTECTED])
(?!.*s).{8,127}$
(?=^.{8,127}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])([EMAIL PROTECTED]).*$
Any guidance would be appreciated - Also can anyone recommend specific
books on how to create and understand them better?
Steve LaBadie, Web Manager
East Stroudsburg University
200 Prospect St.
East Stroudsburg, Pa 18301
570-422-3999
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.esu.edu <http://www3.esu.edu>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269502
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4