in reply to Need Regex help

You should use <code></code> tags around your code, so your posts don't get mangled.

It looks like you want to pull out outer-level matched braces. You might want to look at Text::Balanced.

split takes a regex, by the way.


Caution: Contents may have been coded under pressure.