Regular Expressions 101

Community Patterns

Find text that looks like an Ingredient out of OCR

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