$text = 'This is a line (an example between parenthesis)';
preg_match('/(.*)\((.*?)\)(.*)/', $text, $match);
echo "in parenthesis: " . $match[2] . "\n";
echo "before and after: " . $match[1] . $match[3] . "\n";
ОБНОВЛЕНИЕ после уточнения вопроса .. теперь со многими круглыми скобками:
$text = "This is a text (is it?) that contains multiple (example) stuff or (pointless) comments in parenthesis.";
$remainder = preg_replace_callback(
'/ {0,1}\((.*)\)/U',
create_function(
'$match',
'global $parenthesis; $parenthesis[] = $match[1];'
), $text);
echo "remainder text: " . $remainder . "\n";
echo "parenthesis content: " . print_r($parenthesis,1) . "\n";
Результат:
remainder text: This is a text that contains multiple stuff or comments in parenthesis.
parenthesis content: Array
(
[0] => is it?
[1] => example
[2] => pointless
)