3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = <<<EOT start<body> Some text Some more text </body> text after body EOT; $regex = "/.*<body>(.*?)<\/body>/ms"; $result = preg_match( $regex, $str, $matches); print_r($matches[1]);

preferences:
60.76 ms | 1119 KiB | 5 Q