- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$quotedString = '"(?:[^"\\\\]*(?:\\\\.(*FAIL))?)*"';
$regex = "($quotedString)";
$string = 'This is "A test of the \"Emergency System\" here..."';
var_dump(preg_match($regex, $string, $match), $match);