title: C# Regex, Either Or
body: <p>I have a string that I parse in regex:</p>
  
  <pre><code>"one [two] three [four] five"
  </code></pre>
  
  <p>I have regex that extracts the bracketed text into <code>&lt;bracket&gt;</code>, but now I want to add the other stuff (one, three, five) into <code>&lt;text&gt;</code>, but I want there to be seperate matches.</p>
  
  <p>So either it is a match for <code>&lt;text&gt;</code> or a match for <code>&lt;bracket&gt;</code>.  Is this possible using regex?</p>
  
  <p>So the list of matches would look like:</p>
  
  <pre><code>text=one, bracketed=null 
  text=null, bracketed=[two] 
  text=three, bracketed=null 
  text=one, bracketed=[four]
  text=five, bracketed=null 
  </code></pre>