Regular Expressions 101

Community Patterns

Presciption line 2.0

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 - 8 years ago