3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^--\w+$/m'; $str = '--0000000000000fb2ad0575bf8f28 Content-Type: text/plain; charset="UTF-8" <body> Content. </body> --0000000000000fb2ad0575bf8f28 Content-Type: text/html; charset="UTF-8" <div dir="ltr">&lt;body&gt;<br>Content.<br>&lt;/body&gt;</div> --0000000000000fb2ad0575bf8f28--'; preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0); // Print the entire match result var_dump($matches);

preferences:
56.11 ms | 402 KiB | 5 Q