Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(\(\d{1,3}[0-9,a-z,A-Z]{1}?\)(?<upc>[\d,a-z,A-Z]{1,70}))(\(\d{1,3}[0-9,a-z,A-Z]{1}?\)(?<date>[\d,a-z,A-Z]{1,70}))(\(\d{1,3}[0-9,a-z,A-Z]{1}?\)(?<batch>[\d,a-z,A-Z]{1,70}))
/
gm

Description

Parse the 3 groups of a GS1-128 Barcode

Submitted by Mike D - 2 years ago