fork download
  1. <?php
  2.  
  3. $str = "25 Park Street 15000 My city";
  4. preg_match('/\d\s*(\D+)$/', $str, $matches);
  5. print_r($matches[1]);
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
My city