title: TCL set Special Characters in a string
body: <p>I want to set in TCL the below error message as a variable and compare with the error message from a network switch, by-passing the special characters </p>
  
  <blockquote>
    <p>Use [slot/port] or ["portname"] or [slot/*] or [*].</p>
  </blockquote>
  
  <p>I tried in this way </p>
  
  <pre><code>set x "Use \[slot/port] or \["portname"] or \[slot/\*] or \[\*]."
  </code></pre>
  
  <p>but I am getting the following message while running my script:</p>
  
  <blockquote>
    <p>extra characters after close-quote
    while executing</p>
  </blockquote>
  
  <p>Please help. Thank you!</p>