title: RegEx JavaScript: Match consecutive single line comments
body: <p>I am trying to write a RegEx to parse groups of single line comments. </p>
  
  <p>Given this input:</p>
  
  <pre><code>//line 1
  //line 2
  //line 3
  
  //line 4
  //line 5
  //line 6
  </code></pre>
  
  <p>I expect to have two matches: Lines 1-3 and 4-6. With my current RegEx <code>(^\/\/[\S\s]+$)</code> I have one match: Lines 1-6, although there is an empty line in between.</p>
  
  <p>The problem is that <code>\s</code> matches any whitespace character, so the blank line is included. But at the same time, line break <em>are</em> part of the RegEx – but only when the line starts with <code>//</code>, so I am stuck.</p>
  
  <p>How can I prevent the RegEx from matching the blank line?</p>