Regular Expressions 101

Community Patterns

GS1Numeric Serialized GTIN with Lot and Expiry

0

Regular Expression
Python

r"
^\(01\)(?P<gtin14>[0-9]{14})\(21\)(?P<serial_number>[0-9]{1,20})\(17\)(?P<expiration_date>[0-9]{6})\(10\)(?P<lot>[a-zA-Z0-9]{1,20})
"
gm

Description

GS1Numeric Serialized GTIN with Lot and Expiry

Will recognize and pull into groups the following:

  • GTIN-14
  • Serial Number
  • Expiration Date
  • Lot
Submitted by SerialLab, Corp - 6 years ago