Looking for a regex - 8 char min w/ 1 num and 1 char -
I'm looking for some help in which a regex is required, for which 8 characters (at least) w / 1 number and 1
example: a1234567 is valid but 12345678 is not
Any help for a regex newb?
EDIT:
Thanks for the quick reply - The implementation that works in VB is shown below. Dim Valipesword Boolean = Regex. Ismail (password, "^ (? =. *. [[0-9]] (=? =. * [A-ja-jade]) \ w {8,} $")
something like
^ (? =. * [0-9]) ( <= P>
with your symbols choice
>
^
beginning of the string(? =. * [0-9])
look forward and ensure that at least 1 digit(? =? * [A -ZA-Z])
look forward and make sure there is at least 1 letter\ w { 8,}
actually match 8+ characters$
nno Agree: If you want extra characters (which do not count for 1 letter required)
^ (? =. * [0-9]) (? =? . * [A-zA-Z]). {8,} $
This will allow for any character
If you want permission of only a few characters , Then replace
\ w
with thecode in the first code [A-Za-z0- 9 # #%%] ^ & Amp;
^ (?! [0- 9] $) (?! [A-zA-Z _] $) \ W {8,} $
Comments
Post a Comment