am trying to get postal code (91150) from this html :
<div>
<strong>Adresse de la commune : </strong><br>
HOTEL DE VILLE<br>91150 ABBEVILLE-LA-RIVIERE
<p>Téléphone : <strong>01 64 95 67 37</strong><br>
Fax : <strong>01 69 58 80 17</strong></p>
<p>Localisation géographique : </p>
</div>
in php i did:
$page = file_get_contents($url);
preg_match('`<strong>Adresse de la commune : </strong>([^[0-9]]*)<p>`', $page, $regs);
var_dump($regs);// returns empty
can someone help thanks,
It’s quite certain that your postal code more consequtive digits than phone and fax number. Using this idea you can extract it