I have got a line of a text file and i am using [string range] to go through each character of it. However it is mostly spaces...is there any way to make it find *any* text.
E.g if {$srange == "anytxt"} {
Maybe you could be more clear what you're trying to do. Are you trying to get all the characters, except spaces? When you say "any text" does that include spaces? Are you trying to split up a file that has columns separated by spaces?
Instead of "string range" you might want to try the "split" command. Also, "string match" lets you do a wildcard search. Using "*" will match anything. You can also use "regexp" to do more complicated pattern matching.