Hi Perlsen,
Regexp::Common::balanced helps you in this regard.
In reply to Re: How to avoid the greedy matching failures?. by murugu in thread How to avoid the greedy matching failures?. by perlsen