Sieggy Posted September 6, 2004 Posted September 6, 2004 Prob a simple answer but I'm pretty new to regex. I need to check a string (password) for the existance of at least one character [a-zA-Z] and also at least one digit. Thanks ahead of time for the help! Sieggy Quote
John_0025 Posted September 7, 2004 Posted September 7, 2004 (edited) Sorry I deleted my 1st post. I was thinking you needed to match the whole password, which I don't think is possible in all suituations. However you only need to check there is at least 1 alpha and 1 numeric character and I assume you are not worried about matching the whole password. This should work (\d+[a-zA-Z]+)|([a-zA-Z]+\d+) Edited September 7, 2004 by John_0025 Quote
Sieggy Posted September 7, 2004 Author Posted September 7, 2004 That did the trick Thanks a bunch! Sieg :p Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.