title: Regex to match all excluding block comments
body: <p>The issue is I want to match all of the text on either side of the comment and exclude the comment itself.</p>
  
  <p>There are plenty of 'comments' related regex posts, but most are in other languages (I am using notepad++ which wikipedia tells me is POSIX ERE, let's not discuss languages or tools), and most are focused on finding the comments, which I have done already. </p>
  
  <p>This will find the encompassing text I desire (this will include the internal block comment in the match):</p>
  
  <pre><code>(^)rule ((.|\n|\r)*?)(^)end
  </code></pre>
  
  <p>The above finds anything between 'rule' and 'end', inclusive. Fine.</p>
  
  <p>This will find the block comment:</p>
  
  <pre><code>(?:/\*(?:(?:[^*]|\*(?!/))*)\*/)
  </code></pre>
  
  <p>The above finds anything between <code>/*</code> and <code>*/</code>, inclusive. Fine. I am not concerned if there might be one of the <code>*/</code> inside the comment, not an issue in my case.</p>
  
  <p>Now the question is how do I put the block comment into a negative in the middle of the positive rule match above, so that it matches everything between <code>RULE</code> and <code>END</code> except for commented text?</p>
  
  <p>Bonus points if your answer excludes single line <code>//</code> comments as well.</p>