Below is snippet of html that I will be parsing. It is stored inside a js variable.
<tr class='preview'>
<td class='statistics show' title='Show latest match stats'>
<button class="js-hide">Show</button>
</td>
<td class='match-details'>
<p>
<span class='team-home teams'>
<a href='#'>Leicester</a>
</span>
<span class='versus'>
<abbr title='Versus'> V </abbr>
</span>
<span class='team-away teams'>
<a href='#'>Crystal Palace</a>
</span>
</p>
</td>
<td class='kickoff'>
15:00
</td>
<td class='status'></td>
</tr>
<tr class='preview'>
<td class='statistics show' title='Show latest match stats'>
<button class="js-hide">Show</button>
</td>
<td class='match-details'>
<p>
<span class='team-home teams'>
<a href='#'>Liverpool</a>
</span>
<span class='versus'>
<abbr title='Versus'> V </abbr>
</span>
<span class='team-away teams'>
<a href='#'>Spurs</a>
</span>
</p>
</td>
<td class='kickoff'>
15:00
</td>
<td class='status'></td>
</tr>
Result ..
Leicester vs. Crystal Palace
Liverpool vs. Spurs
I'm interested in the home and away team names. The vs. can be added between each easily.
Could anyone suggest if there is a simple solution for parsing this string? Are RegEx the only approach?