Extract house numbers from address string
PHP Snippet 1:
preg_match_all('!\s(\d.*)!', 'streetname 60/2/3', $matches);
PHP Snippet 2:
function getStreetNumberFromStreetAddress($streetAddress){
$array = explode(' ',$streetAddress);
if (count($array) > 0){
foreach($array as $a){
if (is_numeric($a[0])){
return $a;
}
}
}
return null;
}