title: how to match whole word in TCL? regexp "\\msub1\\M" sub1_ex
body: <p>Please help me in solving this...</p>
  
  <pre><code>set var1 sub1
  set var2 sub
  set var3 sub1_ex
  </code></pre>
  
  <p>i want to match <code>$var1</code> and <code>$var3</code> and not <code>$var2</code> i.e. </p>
  
  <p><code>regexp $var1 $var3</code> should be 1 ; 
  <code>regexp $var2 $var3</code> should be 0 ; but getting 1.</p>
  
  <p>I also tried </p>
  
  <pre><code>regexp "\\m$var1\\M" $var3
  </code></pre>
  
  <p>but got 0.</p>