Hi,
I am new to tcl,
Please help with below simple requirement
I will have a value in my variable, need to check wheather it is numeric or string.
i tried in below way, but did not work
if [ [regexp {^([0-9]+)$} $variable] || ![string match {^([a-z]+)$} $var] ] {
puts "either numeric or string"
}
else {
puts "not number or strin"
}
Please help
I am new to tcl,
Please help with below simple requirement
I will have a value in my variable, need to check wheather it is numeric or string.
i tried in below way, but did not work
if [ [regexp {^([0-9]+)$} $variable] || ![string match {^([a-z]+)$} $var] ] {
puts "either numeric or string"
}
else {
puts "not number or strin"
}
Please help