Regular Expressions 101

Community Patterns

Honorifics Detection

0

Regular Expression
ECMAScript (JavaScript)

/
(Master[^a-z0-9]|Mr[^a-z0-9]|Miss[^a-z0-9]|Mrs[^a-z0-9]|Ms[^a-z0-9]|Mx[^a-z0-9]|Dr[^a-z0-9]|Professor[^a-z0-9]|QC[^a-z0-9]){1,9}
/
gi

Description

Detects Honorifics in a string. proceeding character after Honorifics needs to be an non alph numeric to be detected

Submitted by anonymous - 7 years ago