regex for numbers and special characters code example
Example 1: regex for number and letters
let regex = /[^A-Za-z0-9]+/
Example 2: regex check from a-z 0-9
myString.match(/^[A-Za-z0-9_.]+$/)
Example 3: 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