Code: Select all
<?php
$input = <<<EOD
Character data is roughly all the (non-markup) contents of XML documents, including whitespace between tags.
Note that the XML parser does not add or remove any (whitespace), it is up to the application (you) to decide
whether whitespace is significant.
EOD;
echo preg_match_all("/\(([^-].*?)\)/mi", $input, $matches)."<br />";
print_r($matches);
?>output:
Code: Select all
Array
(
[0] => Array
(
[0] => (non-markup)
[1] => (whitespace)
[2] => (you)
)
[1] => Array
(
[0] => non-markup
[1] => whitespace
[2] => you
)
)