title: Ending syntax region at the start of a given pattern
body: <p>This is a follow-up from:</p>
  
  <p><a href="https://stackoverflow.com/questions/2193157/vim-simple-steps-to-create-syntax-highlight-file-for-logfiles">VIM: simple steps to create syntax highlight file - for logfiles</a></p>
  
  <p>I am trying to use the 'region-match' facility to syntax-highlight stack-traces in some logfiles: these logfiles (log4j-based) look a bit like this:</p>
  
  <pre><code>YYYY-MM-DD HH:MM:ss,SSSS...INFO...Message
  YYYY-MM-DD HH:MM:ss,SSSS...INFO...Message
  YYYY-MM-DD HH:MM:ss,SSSS...ERROR...Message
  ...stack trace...
  ...stack trace...
  ...blah blah, more server-vomit...
  ...
  YYYY-MM-DD HH:MM:ss,SSSS...INFO...Message
  </code></pre>
  
  <p>So far I have managed to almost do what I want with this:</p>
  
  <pre><code>:syntax region error matchgroup=string start=/^\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}:\d\{2},\d\{3}.* ERROR/    end=/^\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}:\d\{2},\d\{3}/
  </code></pre>
  
  <p>But the issue, is that match goes too far - it includes the next record (ie, the match includes the next YYYY-MM-DD....).</p>
  
  <p>I believe from this example (an exampled about quoted text) in the VIM manual that I should be able to highlight in-between? (But I don't seem to be able to map the syntax for my example)</p>
  
  <p><a href="http://vimdoc.sourceforge.net/htmldoc/syntax.html#:syn-excludenl" rel="nofollow noreferrer">http://vimdoc.sourceforge.net/htmldoc/syntax.html#:syn-excludenl</a></p>
  
  <p>So to be clear: I need to match the first YYYY-MM-DD... line (which includes 'ERROR') and then all subsequent lines up to but NOT including the next YYYY-MM-DD line.</p>