title: How do you get a dollar sign into a dejagnu "expect" file pattern?
body: <p>I'm writing a thing for which the string <code>"$ 2 3#::6"</code> is valid input and I need to have a dejagnu test for it, something along the lines of  </p>
  
  <pre><code>{"\"$ 2 3#::6\""    "0 3" }
  </code></pre>
  
  <p>but no combination of escapes or sets has worked.  In theory, the expect file is a tcl script, but none of tcl the backslash, curlies, and quote mechanisms I've tried have done it.  In the past things like using a set:</p>
  
  <pre><code>set vect "\[ .4 .5 .6 \]"
  </code></pre>
  
  <p>to get square brackets has worked:</p>
  
  <pre><code>{"\"3 + $vect\"" "3.4 3.5 3.6" }
  </code></pre>
  
  <p>but nothing similar with dollar signs works.</p>
  
  <p>Any hints?</p>