Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › regsub challenge › Reply To: regsub challenge
The problem is trying to do all of them.
Try this
set x “~~~Some silly text~ more silly text~~~”
while {[regsub -all — {(~)(~)} $x {1 2} x]} {}
echo $x
=> ~ ~ ~Some silly text~ more silly text~ ~ ~