I need a regex in php for matching contents between tags of an element, e.g. <body>
and </body>
with the perl compatible preg_match
.
So far I tried with:
// $content is a string with html content
preg_match("/<body(.|\r\n)*\/body>/", $content, $matches);
print_r($matches);
…but the printout is an empty array.