Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
([\w+\s]+)\s([\d]+)(%|\w+)\s(\w+)\s(\w+)\sx\s(\d)\/(\d+)
/

Description

Recognizes a line of text in a medical prescription. Change log: 2.0 - Recognizes medication names composed of two or more words

Submitted by Jermaine McFarlane - 9 years ago