Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^([A-Z][a-z-]+),? +([A-Z])[^\n]*
/
gim

Description

looks at the full name and grab the first word (last name) and the first letter of the next word (first name initial)

Submitted by anonymous - 7 years ago