Regular Expressions 101

Community Patterns

Standard first and/or last name

2

Regular Expression
PCRE (PHP <7.3)

/
^([a-z]+)(\s)?([a-z]*)
/
i

Description

This just checks for case insensitive first name, last name, or both.

Submitted by Josh Garnick - 8 years ago