Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › insert character in string at certain position
Hi,
I have a string in var1 = 38000E9NK02 and want to insert a dot (.) after position 4 = 3800.0E9NK02
Thanks in advance.
Yu might try something like:
set x “38000E9NK02”
regsub — {(.{4})(.*)} $x {1.2} y
echo $y
3800.0E9NK02
It worked perfectly…thanks a lot!! 😀