Thanks Mark and Paul...

it works!!

----- Original Message -----
From: "Paul Johnston" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 12:47 PM
Subject: RE: Another regular expression question


> using a ^ says "not one of these" and using [] says group these together
>
> how about saying if you find something that is not a number or a letter:
>
> <cfif REFindNoCase('^[A-Z0-9]', variable)>
> ERROR
> <cfelse>
> do processing
> </cfif>
>
> what you said is:
>
> find 0 or more alpha chars and 0 or more digits next to it
>
> which works with any string on the planet!
>
> I hope this helps!
>
> Paul
>
> On Tuesday, April 24, 2001 11:24 AM, JAAV [SMTP:[EMAIL PROTECTED]] wrote:
> > Hi,
> >
> > Yes, I'm a newbie   :)   but it's a short question:
> >
> > How can I check if an string contains alpha-numeric characters only?
> > I'm trying to check if a login name (given by the user) is valid or not.
> >
> > I'm using something like:
> > #REFindNoCase('[[:alpha]]*|[[:digit]]*',attributes.usuario)# but it
doesn't
> > work.
> >
> > BTW, some links of POSIX regular expression are welcome.
> >
> > thanks in advance
> >
> > ~JAAV
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to