I can get the match I want from a large string of HTML using (?<=Var#2).*?(?=tr>)
. It's then from that match I'd like to find a match, the word "available". Using that RegEx in this simple example:
<tr class="product-row">
<td class="product-name">Var#1</td>
<td class="product-day">
<div class="status-container end-marker">
<a class="status-icon available"></a></div></td>
</tr>
<tr class="product-row">
<td class="product-name">Var#2</td>
<td class="product-day">
<div class="status-container end-marker">
<a class="status-icon available"></a></div></td>
</tr>
<tr class="product-row">
<td class="product-name">Var#3</td>
<td class="product-day">
<div class="status-container end-marker">
<a class="status-icon available"></a></div></td>
</tr>
Continue with VAR# changing up to 9
It matches the section between "Var#2" and "/tr" then from this match I'd like to match the word "available". So the process would be match everything in-between "Var#2" and "/tr" and from that match find the word "available" but only between the match. Groups seems to be the way to go however all my tries have failed. Is it even possible?