^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9]).{6,}$
- ^ checks for the start of the input string.
- (?=.*[a-zA-Z]) checks that there are at least one letter.
- (?=.*[0-9]) checks that there are at least one digit.
- (?=.*[^a-zA-Z0-9]) checks that there are at least one special character (not a letter nor digit).
- .{6,} checks that there are at least 6 characters.
- $ checks for the end if the input string.
See also
-- MizardX (so)