Regular Expressions 101

Community Patterns

Initials matcher

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 - 6 years ago