This regex works if you want to match a password based on the following criteria:
- 8 characters long.
- Must include capital letters.
- Must include small letters.
- Must include numbers.
- Must include special characters.
- NOTE: Can also use
[[:punct:]] for special characters but it may not be supported by your regex engine.
NOTE: My use of backticks is messing up markdown on this site so I had to add 2 in a row. You only need one backtick! Best just to use the alt solution.