How to Swap 30 & 40 in IP address 192.30.40.1 using TCL
script?
Answer Posted / hereiam
set x 192.30.40.1
set srcStr {([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)}
regexp $srcStr $x - d1 d2 d3 d4
regsub $srcStr $x "$d1.$d3.$d2.$d1" x
puts $x
Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers