You still haven't explained what "failed in other cases" means.
It's hard to read in your one-liner (have you tried adding the /x flag to your regexp which allows you to write it over multiple lines, with comments?), but in your second statement it sure seems like you are replacing anything that matches ,(?=[^\[\]]*\[*\{*\}*\]) with | ... you probably need to learn about extracting matches, too.
In reply to Re^3: Perl-Replacement of comma in between the matched Patterns
by 1nickt
in thread Perl-Replacement of comma in between the matched Patterns
by cdkumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |