title: Regex to match multiple strings with positive look behind
body: <p>So I have been trying to combine the answers of these two questions:<br>
  <a href="https://stackoverflow.com/q/521146/91866">C# split string but keep split chars\seperators</a><br>
  <a href="https://stackoverflow.com/q/698596/91866">Regex to match multiple strings</a>   </p>
  
  <p>Essentially I'd like to be able to split a string around certain strings and have the splitting strings in the output array of <code>Regex.Split()</code> as well. Here is what I have tried so far:</p>
  
  <pre><code>// ** I'd also like to have UNION ALL but not sure how to add that
  private const string CompoundSelectRegEx = @"(?&lt;=[\b(UNION|INTERSECT|EXCEPT)\b])";
  string sql = "SELECT TOP 5 * FROM Persons UNION SELECT TOP 5 * FROM Persons INTERSECT SELECT TOP 5 * FROM Persons EXCEPT SELECT TOP 5 * FROM Persons";
  
  string[] strings = Regex.Split(sql, CompoundSelectRegEx);
  </code></pre>
  
  <p>The problem is that it starts matching individual characters like E and U so I get an incorrect array of strings.</p>
  
  <p>I'd also like to match around UNION ALL but since thats not just a single word but a string I wasn't sure how to add it the above regex so if someone could point me in the right direction there as well that would be great!</p>
  
  <p>Thanks!</p>