how to add special characters in regular expression in javascript code example Example: regex special characters javascript var regex = /^[a-zA-Z0-9!@#\$%\^\&*\)\(+=._-]+$/g