my $l= ''; $s =~ s{([(,)])}{ my $n= ',' eq $1 && '(' eq $l ? ';' : $1; $l= $1 if ',' ne $1; $n }ge
- tye
In reply to Re: Substituting a comma only when it is preceded and followed by a bracket (closure)
by tye
in thread Substituting a comma only when it is preceded and followed by a bracket
by barraclm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |