Special Characters Regular Expression

A regular expression that matches special characters like !, @, #, $, …

/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi

Matches:

  • ^
  • &
  • !@#$%

Non-matches:

  • alphanumeric

See Also:

Regex Is Copied!