title: TCL regsub isn't working when the expression has [0]
body: <p>I tried the following code:</p>
  
  <pre><code>set exp {elem[0]}
  set temp {elem[0]}
  
  regsub $temp $exp "1" exp
  
  if {$exp} {
      puts "######### 111111111111111 ################"
  } else {
      puts "########### 0000000000000000 ############"
  }
  </code></pre>
  
  <p>of course, this is the easiest regsub possible (the words match completely), and still it doesnt work, and no substitution is done. if I write elem instead of elem[0], everything works fine.
  I tried using {elem[0]}, elem[0], "elem[0]" etc, and none of them worked.
  Any clue anyone?</p>