in reply to Re: Regex matching and substitution
in thread Regex matching and substitution

Consider using Regexp::Common::balanced
Bill