PHP · February 8, 2012 2

PHP: preg_match multi line match

example

$html = '<body>
   <div>some text</div>
</body>';

$regExp = '/<body>(.*)</body>/msU';

preg_match($regExp, $html, $match);

print_r($match);