I am trying to extract the address and telephone number from HTML code.
First I get the contents of the container member-address from the content of the page. preg_match('/id="member-addresses".*?<\/div>/is', $webpage, $contact_details);
This returns this
id="member-addresses">
<h2>Contact details</h2>
<h3 id="foobar">Work</h3>
<p>
123 Fake Street, Main Area, PG42 TGJ<br />
Tel: 020 9 555 42589<br />
</p>
</div>
Now I want to get the Work address.
preg_match('/Work</h3><p>.*?<br \/>/', $contact_details[0], $address_work);
This is not returning anything. What is wrong with it.