$re = '/^:Quote_two \([\s\S]+?[\r\n]+\)/m';
$str = ' :Quote_one (
:parent (QUOTES_ALL)
:id ("abc1234")
:display_name ("Quote Number One")
:children (
: (Quotes)
: (Sayings)
)
)
:Quote_two (
:parent (QUOTES_ALL)
:uuid ("def456")
:display_name ("Quote Number Two")
:Address (
: (
:num ("1234")
:city ("Dallas")
:state ("TX")
)
)
:Numbers (
: (
:num1 ("345-222-1111")
:num2 (123)
:num3 (456)
)
)
:Names (
: ("Test")
: ("Test2")
: ("Test3")
)
)
:Quote_three (
:parent (QUOTES_ALL)
:id ("xyz1234")
:display_name ("Quote Number Three")
:children (
: (Quotes)
: (Sayings)
)
)';
$subst = "";
$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