Regular Expression patterns for Tracking numbers. - Stack Overflow


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. USPS:
  2.  
  3. /\b(91\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d|91\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d)\b/i
  4.  
  5. FedEX:
  6.  
  7. /\b((96\d\d\d\d\d ?\d\d\d\d|96\d\d) ?\d\d\d\d ?d\d\d\d( ?\d\d\d)?)\b/i
  8.  
  9. UPS:
  10.  
  11. /\b(1Z ?[0-9A-Z]{3} ?[0-9A-Z]{3} ?[0-9A-Z]{2} ?[0-9A-Z]{4} ?[0-9A-Z]{3} ?[0-9A-Z]|[\dT]\d\d\d ?\d\d\d\d ?\d\d\d)\b/i

URL: http://stackoverflow.com/questions/619977/regular-expression-patterns-for-tracking-numbers

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.