Need help with regular expressions
I don't know why regular expressions are not working in my application. I've tried it several ways and it's not working. Ultimately, I want to allow any letter, number, underscore or dash, but I cannot get a basic regular expression working (sometimes it accepts what it's not supposed to and sometimes it accepts nothing). I'm using ColdFusion 9,0,1,274733 Enterprise on Linux.
<CFINPUT TYPE="Text" MESSAGE="Please enter a Reservation ID. Only letters, numbers, dashes and underscores are allowed (no spaces or special characters)." NAME="usereventID" REQUIRED="Yes" SIZE="30" VALIDATE="regular_expression" PATTERN="[[:word:]]+">
I tried:
PATTERN="[[:word:]]+"
PATTERN="[[:word:]]"
PATTERN="[:word:]"
PATTERN=":word:"
PATTERN="[[A-Z][a-z][0-9]-_]+"
PATTERN="\w"
and none of these work correctly. Any ideas on what could be wrong?
