in reply to Keeping lookahead assertion from looking to the end of the string?
Hm, this will be very difficult to do in a single regexp. The non-overlapping requirement is similar to the problem of Matching C-style comments. Plus all those .*? are going to make the regex engine go nuts.
A real-live parser would probably be much easier for this. Take a look at Parse::RecDescent, or Parse::Yapp if you're already familiar with YACC/Bison.
|
|---|