title: antlr match any character except
body: <p>I have the following deffinition of fragment: </p>
  
  <pre><code>fragment CHAR   :'a'..'z'|'A'..'Z'|'\n'|'\t'|'\\'|EOF;  
  </code></pre>
  
  <p>Now I have to define a lexer rule for string. I did the following :</p>
  
  <pre><code>STRING   : '"'(CHAR)*'"'
  </code></pre>
  
  <p>However in string I want to match all of my characters except the new line '\n'. Any ideas how I can achieve that?</p>