Regular Expressions 101

Community Patterns

Removal of Non Word Characters

0

Regular Expression
ECMAScript (JavaScript)

/
[^a-zA-Z0-9]\B
/
g

Description

An example of a regex to use when wanting to remove special characters from a string

Submitted by anonymous - 7 years ago