$re = '/(")(.*?)(")/m';
$str = 'This text is not a quote. "This is a quote."
Not a quote.
D. B. says, "My quote is good," but he is not right.
---
In German speaking countries the opening quotation mark is positioned at the bottom („), while the closing quotation mark is at top again (“). The same placement can be found e.g. in Hungary, the Czech Republic, Bulgaria or Russia.';
$subst = "„$2“";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php