<table>; you want to parse out list of two rows.
<tr class="dummy">
First
</tr>
<tr class="foo">
Second
</tr>
</table>
First,
Second
To achieve this use non greedy expression ?. Basically after you state what is pattern and how often it occurs by using ? you want to limit search only to first occurence.
Example regex with UTF8 greedy expression:
(?<=tr\sclass="\w+">)+?(?>\P{M}\p{M}*)+?(?:\<\/tr\>)+?http://stackoverflow.com/questions/2503413/regular-expression-to-stop-at-first-match
This UTF-8 HTMLcoding is very useful to me. Thanks for sharing this coding. Beacon App Development
ReplyDelete