(?=^.{6,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[a-zA-Z]).*$
This regex will validate if:
- password has at least 6 chars
- contains at least 1 numeric digit
- contains at least 1 character (uppercase OR lowercase
Nice piece of regex found on http://www.arjones.net/
Posted by stiengfoto