[thelist] Regular Expression help
Michael Robertson
mike at mikeemedia.com
Mon Nov 17 09:17:37 CST 2003
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 !
>
More information about the thelist
mailing list