in reply to Re^2: Perl-Replacement of comma in between the matched Patterns
in thread Perl-Replacement of comma in between the matched Patterns
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl-Replacement of comma in between the matched Patterns
by cdkumar (Initiate) on Jul 09, 2015 at 05:26 UTC |