ikegami: ... If any backtracking through that the (?{ ... }) that changes @match occurs, you won't get the correct result. ...
OK, I got your point. If the data isn't that regular as given,
the whole wizardry will break. To make that robust, much more effort
is needed (which you already went through in another node =>
Re: Arbitrary number of captures in a regular expression).
Thank you very much for your hint,
Regards
mwa