Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(^([0-9[:punct:]0-9]+|\p{No}|\d\p{No}) ?\s* ?([0-9[:punct:]0-9]+|\p{No}|\d\p{No})* ?\w* (cup|tsp|tbps|tablespoon|teaspoon|small|medium|pint|ounce|pound))|(^(small|Large|medium|Fresh))
/
gmi

Description

Find text that looks like an Ingredient out of OCR. What it says on the tin.

Submitted by anonymous - 3 years ago