How to Swap 30 & 40 in IP address 192.30.40.1 using TCL
script?
Answer Posted / mahesh
# 6 set ip "192.30.40.1"
regsub {(\d+)\.(\d+)\.(\d+)\.(\d+)} $ip "\\1.\\3.\\2.\\4"
new_ip
puts $new_ip
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers