I give an wrong example. Here is a better one

<?php

$txt = "func1($par1," 100 (euro)", func2($par2,"(c) by nobody"))";

if (preg_match_all('

/

([a-zA-Z]\w*?)

\s*

(

\(

(

(?>.*?)|

.*?(?R)*

)

\)

)+

/x

', $txt, $m)){

print_r($m);

} else {

echo "no match";

}

echo "\n";



?>

This must result in :

First call: func1($par1," 100 (euro)", func2($par2,"(c) by nobody"))
Second call with the inner part $par1," 100 (euro)", func2($par2,"(c) by
nobody")
must result in : func2($par2,"(c) by nobody")



Please visit www.regexp.org there is an open thread of this question.

thanx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to