I want to match the address of a property on realty server. Lets say the div containing address is named <div class="title">
and the address is located in the last <h2>
section like this:
<body>
<div class="price">
<h2>
h2
</h2>
</div>
<div class="title">
<abcd>
abcd
</abcd>
<efg>
efg
</efg>
<h2>
adress
</h2>
</div>
</body>
Is there a possible way to capture an address by only one regex, even if it will be in some captured group?
My not working solution is:
regex="/<div class="title">everything_except_<h2>*([^<]*)/";