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