set some_string "Name/is/ComplexSTRUCTUre"
convert this string to,
some_string = "Name/is/ComplexSTR.CTUre"
i.e replacing first "U"
to "."
Try This,
set replaced_string [regsub "U" $some_string "."]
puts $replaced_string
Another Option,
set pos [string first "U" $some_string]
set replaced_string [string replace $some_string $pos $pos "."]
puts $replaced_string
Here your "Name/is"
portion should not contain any "U"
More information can be found here tcl string replacement
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With