proc mulval { addr } {
if {regexp {^([2][2-3][0-9])\.+(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-])\.+(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.+(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])$} $addr } {
puts "Valid IP Multicast Address"
} else {
puts"Invalid IP multicast Address"
}
}
The above code generates the error invalid bareword "regexp" in tcl .
I wanna know what is the mistake in the word and what is invalid bareword in tcl.How to debug.
It doesn't come from your regular expression. It's a Tcl syntax problem. You should write:
Square brackets indicates that the content must be seen as an executable command.