in reply to global string replace
perl -e' $string = "X*X*X*X"; $NEW = 20; $string =~ s/ (?: ^ | \* ) \K X (?= \* | $ ) /$NEW/xg; print "$string\n"; ' 20*20*20*20
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: global string replace
by AnomalousMonk (Archbishop) on Jun 07, 2019 at 19:11 UTC |