- ? : Zero or One
- + : One or More
- * : Zero or More
- \w : alpha numeric values
- \d : digits or numbers
- \s : space
- [A-Z] : all capital letters
- [a-z] : all lowercase letters
- [0-9] : digit from 0 to 9
- ^ : start with
- $ : end with
Example:
- (?=.*[A-Z]) : means at least one occurrence of a capita letter
- (?=.*[!@&^%$]) : at least one special character
- {n} : Exactly n number of chars
- {m,n} : A minimum of m chars and maximum of n chars
- {m,} : Min m chars and max any