fork download
  1. <?php
  2. $re = '/(?<!\bTN: )\d{30}/';
  3. $str = 'Item/s shipped:
  4. Mug 15oz
  5. TN: 720315589361269903507180163568
  6. URL: https://w...content-available-to-author-only...l.com/global-en/home/tracking/tracking-ecommerce.html?submit=1&tracking-id=720315589361269903507180163568';
  7.  
  8. preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0);
  9.  
  10. var_dump($matches[0][0]);
  11.  
  12. ?>
Success #stdin #stdout 0.02s 26220KB
stdin
Standard input is empty
stdout
string(30) "720315589361269903507180163568"