That looks VERY similar to one I found and tried for this thread :-) It didnt work either. It was the same problem, '111111' validates but he asked for letters and at least 1 number. I took that as meaning it has to have at least 1 letter and at least 1 number.
..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -----Original Message----- From: Patrick McElhaney [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 9:23 PM To: CF-Talk Subject: Re: RegEx help Can't resist the challenge. :-) "^(?=.*\d).{6,12}$" I'm not sure if this will actually work in CF. Patrick On 11/27/06, Bobby Hartsfield <[EMAIL PROTECTED]> wrote: > You can also still do it in one cfset with Ben's 2 separate expressions... > > <cfset var = "abcdefg1" /> > <cfset newvar = refindnocase("[\w]{6,12}", var) AND refind("[0-9]+", var) /> > > > ..:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > > > > -----Original Message----- > From: Ben Nadel [mailto:[EMAIL PROTECTED] > Sent: Monday, November 27, 2006 9:32 AM > To: CF-Talk > Subject: RE: RegEx help > > I say break it up into two different test: > > > <cfif > REFind( "[\w]{6,12}", strText ) AND > REFind( "[0-9]+", strText )> > > </cfif> > > It keeps it much more simple and easy to read than a bigger, more > complex RegEx > > > ....................... > Ben Nadel > Certified Advanced ColdFusion MX7 Developer > www.bennadel.com > > Need ColdFusion Help? > www.bennadel.com/ask-ben/ > > -----Original Message----- > From: Chris Alvarado [mailto:[EMAIL PROTECTED] > Sent: Monday, November 27, 2006 9:08 AM > To: CF-Talk > Subject: RegEx help > > Hello all, > > > > Im a bit rusty with regular expressions and I know this is an easy one > so im kicking myself for not having it that much more. > > > > Im simply trying to ensure that a given string has between 6 and 12 > characters and contains at least 1 numeric character. > > > > Any help would be greatly appreciated! > > > > -chris > > > > > > _____ > > I've stopped 6,181 spam and fraud messages. You can too! > Free trial of spam and fraud protection at HYPERLINK > "http://www.cloudmark.com/sigs?rc=m874hl"www.cloudmark.com > HYPERLINK "http://www.cloudmark.com/sigs?rc=m874hl" > > > > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.14.17/553 - Release Date: > 11/27/2006 > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261809 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

