Wednesday, June 11, 2014

Regex

Okey, so I'm trying to add requirements for a string.



Uppercase, Lowercase, No spaces, Digits, Special Characters



Pattern I have so far is


Code:

((?=.*\S)(?=.*[A-Z])(?=.*[a-z])(?=.*\d).{6,21})





Code:

nick

Nick

Nick1

Nick+1 *match

Nick +1 *match




I though /S should make sure it was no spaces.



Anyone that could guide me or tell me what im doing wrong?

No comments:

Post a Comment