Here is sample data
<table class="sparql" border="1">
<tr> <th>abstract</th></tr>
<tr>
<td>
Cologne is Germany's fourth-largest city, and is the
largest city both in
the German Federal State of North Rhine-Westphalia and within the
Rhine-Ruhr Metropolitan Area, one of the major European metropolitan
areas with more than ten million inhabitants."@en
</td>
</tr>
</table>
and I am trying to get the contents between <td> tag using Regular Expression. I tried something like
<td>.*</td>
But how to discard tags itselef?
As @MisterJack points out, you need to use subexpressions to be able to refer to the match. If you’re using
REReplace(), then you can use\1(or\2, etc.) as a backreference to the match. If you’re usingREFind(), then you’ll want to use it withreturnsubexpressions=true, and it will return astructwithlenandposarrays for the matching values. I would do this:You should see a structure with
lenandposarrays. It may have only one element in each array. In order to get the match content you could then do:Hope this helps.