Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $str = 'Munson 11010 Shelter Island Heights. . . .. 11965 Brentwood 11717 Halesite 11743 ';
- preg_match_all("/d{5}/", $str, $matches);
- print_r($matches);
- ?>
- preg_match_all('[^0-9]([0-9]{5})[^0-9]', $input, $out);
- foreach($out as $val)
- echo $val[1] . "n";
- preg_match_all("/d{5}/", $input, $matches);
- foreach($matches[0] as $zip){
- echo $zip.'<br/>';
- };
Add Comment
Please, Sign In to add comment