$re = '/<caption>((?:.)*?)<\/caption>/';
$str = '<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
<caption>Турнірна таблиця групи «J»:</caption>
<tbody>
<tr>
<td>№</td>
<td>Команда</td>
<td>І</td>
<td>В</td>
<td>Н</td>
<td>П</td>
<td>З:П</td>
<td>О</td>
</tr>
<tr>
<td>1.</td>
<td>«Естерсунд» (Швеція)</td>
<td>3</td>
<td>2</td>
<td>1</td>
<td>0</td>
<td>5:2</td>
<td>7</td>
</tr>
<tr>
<td>2.</td>
<td><strong>«ЗОРЯ» (Україна)</strong></td>
<td>3</td>
<td>2</td>
<td>0</td>
<td>1</td>
<td>3:3</td>
<td>6</td>
</tr>
<tr>
<td>3.</td>
<td>«Атлетік» (Іспанія)</td>
<td>3</td>
<td>0</td>
<td>2</td>
<td>1</td>
<td>2:3</td>
<td>2</td>
</tr>
<tr>
<td>4.</td>
<td>«Герта» (Німеччина)</td>
<td>3</td>
<td>0</td>
<td>1</td>
<td>2</td>
<td>1:3</td>
<td>1</td>
</tr>
</tbody>
</table>';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php