in reply to Re^2: Would study help this regexps performance?
in thread Surprisingly poor regex performance

I agree. I think that judicious use of the cut operator (?>...) may have helped your original regex avoid backtracking, but I haven't done any benchmarking to prove that thought.


Examine what is said, not who speaks.        The end of an era!
"But you should never overestimate the ingenuity of the sceptics to come up with a counter-argument." -Myles Allen
"Think for yourself!" - Abigail        "Time is a poor substitute for thought"--theorbtwo         "Efficiency is intelligent laziness." -David Dunham
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon