Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?:(?:[a-zA-Z](?:\.\s?|$))++)$
/
g

Description

Matches "J.M.D", but will not match "Jordy". Only matches initials

Submitted by anonymous - 7 years ago