Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^\p{L}+(['-]\p{L}+)*\.?(\s\p{L}+(['-]\p{L}+)*\.?)+$
/

Description

2 or more words allowed in any alphabet with "'" and "-" symbols (not more than one successively) and dot in the end of any word.

Submitted by anonymous - 8 years ago