Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

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

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. - 10 years ago