Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^\s*(?:M(?:iss|rs?|s)|Dr|Rev|Er)\b[\s.]*
/
igsm

Description

remove any salutation like mr. mrs Dr. etc from the beginning of the name

Submitted by prax - 2 years ago