Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-08-17 18:58
Flavor·ECMAScript (JavaScript)

/
([A-Z])\w+\s([A-Z])\w*\s*([A-Z])*(?=,*)
/
Open regex in editor

Description

Matches 2 or 3 initials from a name. If there is a "," and suffix like Jr., it does not include that in the result.

Submitted by Brad M.