Re: What's the difference in this "string match"ing ...



MartinLemburg@UGS wrote:
Hello,

I traced down a problem I can not understand.

Why is the following different? (perhabs the question is foolish or
the answer is the easiest to find, but ...)

% string match {*\\} "a\\"
1
% string match "*\\" "a\\"
0

Thanks for any hint!


here's a hint

set a {*\\}
set b "*\\"

puts "length of a = [string length $a]"
puts "length of b = [string length $b]"

puts "a contains <$a>"
puts "b contains <$b>"


Bruce
.



Relevant Pages