Regular Expressions 101

Community Patterns

Last Name, First Name with some extras


Regular Expression
PCRE2 (PHP >=7.3)



Restricts the input of the field to the following format: (Last Name, First Name) The parentheses are included as part of the restriction. Additionally, this formatting allows for hyphenated names, first or last names with more than one word (i.e., Mary Beth, Smith-Doe, etc.).

Submitted by Alexa - 3 years ago