in reply to How to avoid the greedy matching failures?.
Hi Perlsen,
Regexp::Common::balanced helps you in this regard.