Regular Expressions 101

Community Patterns

Name Validation

1

Regular Expression
PCRE (PHP <7.3)

/
^[A-Z][a-zA-Z '.-]*[A-Za-z][^-]$
/

Description

Start with capital letter. Allowed special characters '(Apostrophe) -(hyphen) .(dot) (space) and can not end with -(Hyphen)

Submitted by Venu Nimmagadda - 9 years ago