This is probably a simple one, but I have little experience with regexps. I have a string that must only contain letters and/or numbers and be between 6 and 20 characters long. So far, I have [a-zA-Z0-9]{6,20} but that only gets me 1/2 way there.
Thanks!
[Todays Threads]
[This Message]
[Sub
^[a-zA-Z0-9]{6,20}$
The ^ matches the beginning o the string and the $ the end.
--Ben Doom
Todd wrote:
> This is probably a simple one, but I have little experience with
> regexps. I have a string that must only contain letters and/or numbers
> and be between 6 and 20 characters long. So fa
;
Sent: Friday, June 25, 2004 3:55 PM
Subject: Re: A little regexp help
> ^[a-zA-Z0-9]{6,20}$
>
> The ^ matches the beginning o the string and the $ the end.
>
> --Ben Doom
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
> characters long that contains _only_ letters and/or numbers. No special
> characters at all. In the case of ^[a-zA-Z0-9]{6,20}$ it allows special
> characters once it finds at least 6 letters and/or numbers. It's that
> "only" part that is giving me trouble.
Um. No, it shouldn't. I doesn't
Are you trying to FIND a valid string, an invalid string, or are you trying to FIX an invalid string?
Jerry Johnson
>>> [EMAIL PROTECTED] 06/25/04 04:04PM >>>
Thanks, but doesn't quite do it. I should probably clarify what I need. I
left out an important word last time.
What I need to end up w
t;Ben Doom" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 4:09 PM
Subject: Re: A little regexp help
> > characters long that contains _only_ letters and/or numbers. No special
> > characters at all. In the case of ^[a-zA-Z0-9
When someone adds or resets a password, I'm trying to make sure what they
entered matches the pattern I described below.
- Original Message -
From: "Jerry Johnson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 4:14
When I tested ^[a-zA-Z0-9]{6,20}$ against "astrjuh" it matched, but not
when I tested it against "astrjuh$".
What version of CF are you using?
--Ben
Todd wrote:
> Yes.
>
> It works correctly as long as there are not at least 6 alphanumeric
> characters side by side. Once there are 6 in a row
-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 5:08 PM
Subject: Re: A little regexp help
> When I tested ^[a-zA-Z0-9]{6,20}$ against "astrjuh" it matched, but not
> when I tested it against "astrjuh$".
>
> What version of CF are you using?
>
&g
MAIL PROTECTED]>
Sent: Friday, June 25, 2004 5:20 PM
Subject: Re: A little regexp help
> 6.1 Enterprise
>
> I'm beginning to think it's some screwy thing with the pattern attribute.
I
> should probably just break it out into a seperate _javascript_ function and
be
> don
te _javascript_ function and be
done with it.
- Original Message -
From: "Ben Doom" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 5:08 PM
Subject: Re: A little regexp help
> When I tested ^[a-zA-Z0-9]{6,20}$ against &q
" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, June 25, 2004 5:20 PM
> Subject: Re: A little regexp help
>
> > 6.1 Enterprise
> >
> > I'm beginning to think it's some screwy thing with the pattern at
12 matches
Mail list logo