SoFunction
Updated on 2025-03-03

js regular judgment illegal character restrict input

Cannot enter! @#¥%…&* Regular expression writing for this character:


/[@#\$%\^&\*]+/g This contains any of the above special characters. Pick! Just


alert(!/[@#\$%\^&\*]+/("test")) Returning false means that there is no illegal characters.