regex to restrict special characters in phone numbers code example
Example 1: regular capital letter special character and letters password validaton
^(?=.{10,}$)(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\W).*$
Example 2: regex match numbers and special characters
echo %H1E2L+L#O! | sed 's/[^A-Z!]//g' #replaces number and special
characters which aren't ! or an uppercase letter A-Z