Regular Expressions 101

Community Patterns

Community Library Entry

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