3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '$error = "An error page was displayed to the Web Services user.\nDetails: The Status you have chosen is invalid.\n\nStack Trace: Stack trace:.........";'; $pat = "/.+Details: (.+) \\n\\nStack.+/m"; preg_match($pat,$string,$matches); var_dump($matches);

preferences:
50.56 ms | 402 KiB | 5 Q