Regular Expressions 101

Community Patterns

Community Library Entry

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 - 8 years ago