Regular Expressions 101

Community Patterns

Container Number

1

Regular Expression
PCRE (PHP <7.3)

/
([a-zA-Z]{3})([UJZujz])(\d{6})(\d)
/

Description

Check ISO 6346 container number. First three chars, unit type, six digits and then one check digit.

Submitted by Symon Davis - 8 years ago