I tried the below expression. It worked for few cases and failed for other cases. Dont know the reason. First expression is to replace comma between <string>{ and } and other to replace comma between <string>[{ and }]
perl -pe 's/,(?=[^\{\}]*\d\b*\{*\})/|/g;s/,(?=[^\[\]]*\[*\{*\}*\])/|/g +;'
In reply to Re^2: Perl-Replacement of comma in between the matched Patterns
by cdkumar
in thread Perl-Replacement of comma in between the matched Patterns
by cdkumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |