Friday, August 8, 2008

Regular Expression

* = zero or many
? = zero or one
+= one or more
"[dl]og" will match dog, or log, but it will not match dlog.
[^dl]og" now we will match any sequence ending in og that isn't preceded with a d or l, such as fog.
a range of characters using the - (dash) character

<cfform id="form1" name="form1" method="post" action="">
<cfinput type="text" name="reg" id="textfield" validate="regular_expression" pattern="([0-3]{3})([a-z]{5})*" /> </label>
<cfinput type="submit" name="button" id="button" value="Submit" />
</cfform>

No comments: