title: Flex default rule
body: <p>How do I customize the default action for flex. I found something like &lt;*> but when I run it it says "flex scanner jammed"? Also the . rule only adds a rule so it does not work either. What I want is</p>
  
  <pre><code>comment               "/*"[^"*/"]*"*/"
  
  %%
  {comment}             return 1;
  {default}             return 0; 
  &lt;&lt;EOF&gt;&gt;               return -1;
  </code></pre>
  
  <p>Is it possible to change the behavior of matching longest to match first? If so I would do something like this</p>
  
  <pre><code>default               (.|\n)*
  </code></pre>
  
  <p>but because this almost always gives a longer match it will hide the comment rule.</p>
  
  <p>EDIT</p>
  
  <p>I found the {-} operator in the manual, however this example straight from the manual gives me "unrecogized rule":</p>
  
  <p>[a-c]{-}[b-z]</p>