REGEX For common courier tracking numbers
I was on the hunt not only to find the different variations each courier had for their tracking numbers but also a regex to match. Most of the google fu I found was outdated. Fedex “recently” (months? years? days?) changed from a 12 digit to 15 digit system. And NO, tracking numbers are not totally random. There is usually a space separation on the printed labels you see. Each of the spaced out subsets have a meaning to the courier as well as a checksum. Checksum being, a pre selected sequence of particular number positions added together then divided by a pre selected number. That you can search up yourself if you like. I didn’t find all too much on that matter either.
I am not very good with regex so if there are any suggestions by l33t coderz, they are more than welcome. On with the codes:
/****
[ UPS ]
9 digits, or 1Z+whatever digits
The quick brown fox 1Z9999W99999999999 jumps over the lazy dog.
*/
$ups = '/(\b\d{9}\b)|(\b1Z\d+\b)/';
/****
[ Fedex ]
12 digits, 15 digits, or '96'+ 20 digits
The quick brown fox 999999999999 jumps over the lazy dog.
*/
$fedex = '/(\b96\d{20}\b)|(\b\d{15}\b)|(\b\d{12}\b)/';
/***
[ USPS ]
30 digits, '91'+20 digits, 20 digits (untested)
< TOTALLY UNTESTED BY ME AT THIS TIME >
*/
$usps = '/(\b\d{30}\b)|(\b91\d+\b)|(\b\d{20}\b)/';
I did get the common characters per courier from Packagetrackr. I don’t know how much of it is accurate, but from what I could tell from my experience with FedEx and UPS it seemed to be in line. I was unable to find an all inclusive source.
useful information ,thanks for your sharing.
Thanks of this package tracker i will try this hoping it will help.
Hi, the article is so wonderful, I am interested in it. I will pay attention to your articles.
Emphasis on shares, the state council has MBT Shoes instruct the relevant departments to MBT Shoes Uk improve MBT Shoes MBT Shoes Clearance Sale school bus standard, completes MBT Shoes the school bus MBT Shoes Clearance design, MBT Shoes Uk production, transformation, equipped with the work, MBT Shoes and establish the MBT Shoes Sale corresponding management system. Well the school bus funds needed for MBT Shoes Uk MBT Karani Shoes the work by the central and local governments share, multiparty raise. To clear the local government and department responsibility, strict liability ZhuiJiuZhi, malignant MBT Shoes Clearance accidents MBT Shoes Sale happened to serious processing according to law.
I find it very useful the info you gave, especially for people who a looking to do what to do with their Flash gallery.
I will immediately grab your rss feed to stay privy of any updates!
. Hi. I am very satisfied I found this webpage, I truly discovered you by mistake, whilst I’d been searching Aol for another thing, Anyway I am here now and would just like to regards for the wonderful website posting as well as a all round useful web web site .
In addition, it revolved all around exactly how the lady was still struggling to overcom this kind of gamer as well as this gamer although the girl seemed to be sure she had been this “better” tennis participant together with the “better” practicing tennis photographs (as well as superior practicing tennis kit).