Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^[a-zA-Z0-9 ]*$
/
gm

Description

If string contains special chars no match. Blank space is safe. It will accept blank spaces.

Submitted by binary_fm - 8 years ago