Regular Expressions 101

Community Patterns

Keep only the code characters

0

Regular Expression
PCRE (PHP <7.3)

/
[!0-9,a-z,A-Z, ,\n]
/
g

Description

Strips out all alphanumeric characters from your code and leaves you with only the code characters.

Submitted by Tim van Steenbergen - 7 years ago