Hey,
Im trying to match the first part of an address,
e.g:
22b street name
92 street name
This is what i have so far....
$address = "22b; Broad St; Staple Hill";
//$address = "22; Broad St; Staple Hill";
$addressLine = explode(";",$address);
if(preg_match("^[0-9]+([a-zA-Z])^", $addressLine[0]))
{
echo '<b>address line 1 has been matched as</b> '.$addressLine[0];
}
else
{
echo 'did not matched as '.$addressLine[0];
}
Problem is, its matching 22b, but not just 22.
Any help greatly appreciated!
Daz