title: Match first occurrence of semicolon in string, only if not preceded by '--'
body: <p>I'm trying to write a regular expression for Java that matches if there is a semicolon that does not have two (or more) leading '-' characters.</p>
  
  <p>I'm only able to get the opposite working: A semicolon that has at least two leading '-' characters.</p>
  
  <pre><code>([\-]{2,}.*?;.*)
  </code></pre>
  
  <p>But I need something like</p>
  
  <pre><code>([^([\-]{2,})])*?;.*
  </code></pre>
  
  <p>I'm somehow not able to express 'not at least two - characters'.</p>
  
  <p>Here are some examples I need to evaluate with the expression:</p>
  
  <pre><code>; -- a           : should match
  -- a ;           : should not match
  -- ;             : should not match
  --;              : should not match
  -;-              : should match
  ---;             : should not match
  -- semicolon ;   : should not match
  bla ; bla        : should match
  bla              : should not match (; is mandatory)
  -;--;            : should match (the first occuring semicolon must not have two or more consecutive leading '-')
  </code></pre>