title: Lexer rule (regex) for TeX equation
body: <p>In TeX, equations are defined in between <code>$...$</code>. How can I define the lexer rule for lex, for the instance of <em>any number of any characters between two dollar signs</em>?</p>
  
  <p>I tried:</p>
  
  <pre><code>equation  \$[^\$]*\$
  </code></pre>
  
  <p>without a success.</p>