[thelist] Regular Expression help

bruce bedouglas at earthlink.net
Mon Nov 17 10:57:27 CST 2003


hey...

not that it might help... it's been a while since i've dealt with regex
expressions...

could you do it in two steps...
1) verify the length...
2) check if the chars are available...

-regards...


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Michael Robertson
Sent: Monday, November 17, 2003 7:18 AM
To: Joshua Olson; thelist at lists.evolt.org
Subject: Re: [thelist] Regular Expression help


Thank you. That's almost it. By any character i mean a-zA-Z. Sorry about
that.

The only problem with this on is it forces at least 5 letters. I need it to
accept any combination of letters and numbers with a minimum length of 6 and
at least 1 digit.

for example these would all be ok:

password1
pass123
pw1234

Thanks again


>
> > i need a RE that will match a string that is a minimum of 6
> > characters long and musit contain at least one digit.
>
> Michael,
>
> If by "character" you mean ANY character, then the following may work:
>
> .{5,}[0-9]|....[0-9].|...[0-9]..|..[0-9]...|.[0-9]....|[0-9].{5,}
>
> If by "character" you mean alphanumeric, then replace the periods with
> whatever character set you want, eg:
>
> [a-zA-Z0-0]{5,}[0-9]|    ...  etc
>
> This a brute force technique, but should work nicely.
>
> Good luck,
>
> <><><><><><><><><><>
> Joshua Olson
> Web Application Engineer
> WAE Tech Inc.
> http://www.waetech.com
> 706.210.0168
>
>
>
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list