fork(1) download
  1. <?php
  2.  
  3. $text = "A new quote has been logged in your online quoting system at 3\/16\/2014 10:48:13 PM.\r\n\r\nThe quote is from Cade Carrier; (email: cadecarrier@rocketmail.com) and is for these items:\r\n\r\n\r\nTires: 195 60 15 - Direct Input (2)\r\n\r\nAdditional request information:\r\n\r\nAddress:\r\n412 2nd st \r\nElton, United States Louisiana, 70532\r\nPhone: 2817399840\r\n\r\nLocation Information:\r\n\r\nYou have requested a quote from the following location:\r\nStore 16\r\n810 3rd. Ave\r\nKinder, LA 70648\r\n\r\nComments:\r\n\r\n";
  4. preg_match('/Address:.*(, \d{5})/s', $text, $address);
  5. print_r($address);
Success #stdin #stdout 0.02s 52480KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Address:
412 2nd st 
Elton, United States Louisiana, 70532
    [1] => , 70532
)