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