CFDevHead
asked on
Regular Expressions
I am trying to stop users from entering an id number (which has to be between 1 and 11 chars in length) that is all zeros like so "000" or "0000000000" but they can enter in BLL00ssa
I started with this
<cfif not findNoCase('[1-9]+[a-z]+[A -Z]',id)>
<script language="JavaScript">
self.opener.zeros();
</script>
<script language="JavaScript">
self.close ();
window.close ();
</script>
</cfif>
but as U can see it does not work
I started with this
<cfif not findNoCase('[1-9]+[a-z]+[A
<script language="JavaScript">
self.opener.zeros();
</script>
<script language="JavaScript">
self.close ();
window.close ();
</script>
</cfif>
but as U can see it does not work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would probably be best to review the CFML Reference page for REFindNoCase (http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functa64.htm#wp1111121).
If the regular expressions become to cumbersome, you might want to just hard code in the 11 <cfif> statements that would check for the taboo strings.
Best of luck,
Steven