Created
January 14, 2023 02:35
-
-
Save emmaly/1128892905ea2e0cdde325e4f55980ed to your computer and use it in GitHub Desktop.
Regular Expression for Tracking Numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\b(?:(?<International>[A-Z]{2}[0-9]{9}[A-Z]{2})|(?<FedEx>[0-9]{4} ?[0-9]{4} ?[0-9]{4} ?(?:[0-9]{3})?)|(?<UPS>(?:(?:(?:1Z)[0-9A-Z]{16})|(?:(?:T)[0-9A-Z]{15}[0-9])|(?:[0-9]{9})|(?:[0-9]{26})))|(?<USPS>(?:(?:(?:93|92|94|95)[0-9]{2} ?[0-9]{4} ?[0-9]{4} ?[0-9]{4} ?[0-9]{4} ?[0-9]{2,4})|(?:(?:70|14|23|03)[0-9]{14})|(?:(?:M0|82) ?[0-9]{3} ?[0-9]{3} ?[0-9]{2})|(?:(?:[A-Z]{2})[0-9]{9}(?:[A-Z]{2})))))\b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment