Regular Expressions 101

Community Patterns

Search for Qualifications

1

Regular Expression
PCRE (PHP <7.3)

/
((\s|^|\/|\(|\,)(M\.?\s*D\.?)(\s|$|\/|\)|\,)|(\s|^|\/|\(|\,)(D\.?\s*O\.?)(\s|$|\/|\)|\,))
/
gim

Description

This will identify M.D.'s and D.O.s, regardless of punctuation (within reason) and exclude similar matches (e.g., DMD)

Submitted by anonymous - 9 years ago