Thanks to all of you!
I solved it. It was a greedy problem.
I just don't understand why in PHP .* catches far over the (...) when I
don't set the N (non-greedy) Option. - In my Opinion it should at least
stop matching, when the match-making ) is reached. - But it doesn't!
In perl, this is no problem, I tried a few one-liners with the g option
(perl's greedy option) with my example now.
PHP seems to match, and match ..., and does not stop with matching until the
end of the subject string is found.
I recently wrote a (unfortunately at the moment closed source) c++ API for
libpcre. Because the PHP API seems to be kind of copied from pcre, I think
I'll have to make some tests, if this behaviour is also present in he pcre
API, this will really be a problem for me.
Question: Is it correct PHP pcre behaviour to match all over the
match-delimiter ) ?
Many thanks for every answer,
yours Henri
--
| Henri Schomäcker - BYTECONCEPTS, VIRTUAL HOMES
| * * Datendesign für Internet und Intranet
| * * * *
http://www.byteconcepts.de
| * * * *
http://www.virtual-homes.de