Hallo Zusammen,
ich bräuchte mal ein paar Ideen eurerseits.
Ich habe einen
HTML-Text, in dem u. a. eine solche Tabelle abgebildet ist:
Code:
</header>
<div class="container content-layout">
<div class="row">
<div class="col-md-2 left-layout-col">
<strong class="table-head">Günstigste Preise</strong>
<table class="left-statistic">
<thead>
<tr>
<th>Sorte</th>
<th>Preis</th>
</tr>
</thead>
<tr>
<td>
Diesel
</td>
<td><a href="/tankstelle/bft-1696" rel="nofollow">1,529</a></td>
</tr>
<tr>
<td>
Super E10
</td>
<td><a href="/tankstelle/esso-119" rel="nofollow">1,359</a></td>
</tr>
<tr>
<td>
Super E5
</td>
<td><a href="/tankstelle/landwirtschaftliche-bezugsgenossenschaft-eg-2642" rel="nofollow">1,564</a></td>
</tr>
</table>
Ich möchte an die Namen (Diesel, Super E10, Super E5) und an die Preise darunter: <td><a href="/tankstelle/esso-119" rel="nofollow">
1,359</a></td>
Ich tendiere jetzt zu RegEx, schon allein, weil ich es schon in dem Projekt verwende.
Aber hat jemand eine andere Idee, wie ich an die Werte kommen könnte?
Vielleicht gibt es ja auch noch was einfacheres?