Posted by ngmr80 on 06/05/07 15:18
Hi,
I'm experiencing a problem when trying to capture substrings with
preg_match_all() from strings like
"set('Hello','World')"
using the following Regular Expression (PERL syntax):
"/^set\((?:'([^']+)'(?(?!\)),))+\)$/"
The resulting matches array looks like this:
Array
(
[0] => Array
(
[0] => set('Hello','World')
)
[1] => Array
(
[0] => World
)
)
I wonder why "Hello" is not in the matches array. Did I do something
wrong in my Regular Expression?
Thanks in advance.
Ingmar
[Back to original message]
|