i'm using php and have a problem with some regular expressions, i want to take every table from a piece of html
the table can begin with <tr class="result_odd"> or <tr class="result_even">
and ends with
</tr>
is it possible to pull all occurences of this pattern into an array?
thanks
Yes. You'd use the pattern of this type:
$pattern = '~<tr.*class="result_(?:odd|even)">(.*)</tr>~iU'; preg_match_all($pattern, $subject, $matches);
** Note, it might not work, just meant as an outline...