Вот такой скрипт PHP: <? echo '<pre>'; $text = '<html> <head> <title>Hello, world</title> </head> <body> <table> <tr> <td>Table #1</td> </tr> </table> <table> <tr> <td>Table #2</td> </tr> </table> <table> <tr> <td>Table #3</td> </tr> </table> </body> </html>'; preg_match_all('|<table>(.*)</table>|',$text,$title); print_r($title); echo '===========<br>'; preg_match_all('|<title>(.*)</title>|',$text,$title); print_r($title); ?> Выводит Код (Text): Array ( [0] => Array ( ) [1] => Array ( ) ) =========== Array ( [0] => Array ( [0] => ) [1] => Array ( [0] => Hello, world ) ) Просто мистика какая-то :shock:
PHP: <?php preg_match_all('|<table>(.*?)</table>|s',$text,$title); Sergey89 |s тоже нужен, у него же многострочная строка