string. Try <cfset variables.ThisRegex="^[A-Z]$">
Matthew
________________________________________
From: Matt Robertson [mailto:[EMAIL PROTECTED]
Sent: Monday, 31 May 2004 2:18 p.m.
To: CF-Talk
Subject: Rookie Regex question
I want to be able to plug in a dynamic regex, like you see below.��Its
part of a thing that lets someone specify regex-based form field
validation.
Thing is, the code below passes and I want it to fail.��I'm sure the
problem is my rudimentary regex skills.��I'm doing something stoopid
here, but I can't find it.
If I wanted the string below to accept only uppercase chars, A to Z,
what would I change here?��
<cfset variables.ThisRegex="[A-Z]">
<cfset form.FieldValue="HOLTSVILLEblah">
<cfif REFind("#variables.ThisRegex#",form.FieldValue)>
passed<cfelse>failed</cfif>
<cfset test=REFind("#variables.ThisRegex#",form.FieldValue)>
<cfdump var="#variables#">
--------------------------------------------
Matt Robertson������ [EMAIL PROTECTED]
MSB Designs, Inc.��http://mysecretbase.com
--------------------------------------------
________________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

