in reply to
I don't remember regex seeming this hard before
To do the nesting right with a regex you'd need to use (??{}) which is probably not the simplest answer for this problem. Use one of the other solutions
Comment on
Re: I don't remember regex seeming this hard before
In Section
Seekers of Perl Wisdom