I have this small piece of code, I am trying to detect if a variable $banlistremove has any number, from like the 0 to 9 range, 0, 1, 2, 3......, 9, 0 in it, or not.

Code: Select all
if {(([string match *[0-9]* $banlistremove]) || ([string match *[0-9][0-9]* $banlistremove])) && (![string equal -nocase $banlistremove "all"])} { banlist:clean:specific $chan }

Code: Select all
[03:35] Tcl error [banlist:type]: invalid command name "0-9"

What could be the reason?
