title: Regular expression to match last line break in file
body: <p>In my quest to learn flex I'm having a scanner echo input adding line numbers.</p>
  
  <p>After every line I display a counter and increment it.</p>
  
  <p>Trouble is there is always a lone line number at the end of the display.</p>
  
  <p>I need a regex that will ignore all line breaks except for the last one.</p>
  
  <p>I tried <code>[\n/&lt;&lt;EOF&gt;&gt;]</code> to no avail.</p>
  
  <p>Any thoughts?</p>