top of page
networktestinggenius.tk
Your networking tutor
Exclusive networking testing notes
Learn Networking & Testing topics

set str 192.168.3.110
regexp {(^[0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$} $str all first second third fourth
puts "$all \n $first \n $second \n $third \n $fourth \n"
if {$first <= 255 && $second <= 255 && $third <= 255 && $fourth <= 255} {
puts "valid ip address"
} else {
puts "invlaid ip address"
}
bottom of page