Regular Expressions 101

Community Patterns

Shortening Names: Capture a group between a white space and a comma.

0

Regular Expression
PCRE (PHP <7.3)

/
^.*\s(\p{L}*,.*$)
/
g

Description

For shortening names.

Submitted by anonymous - 7 years ago