title: Can a regex be 'reverse' engineered to output each of it's patterns into a list or table?
body: <p>I have some complex regex patterns that are used by a php app that utilizes them in turn for some complex logic output. I'd like to do some testing of the constituent parts so I can identify what fails, in other words is it a regex and if so which part of the regex as I've found some work and some don't</p>
  
  <p>So can I take for instance:</p>
  
  <ul>
  <li>(Bob|Robert)( &amp; | and)(Sally|Jane)</li>
  </ul>
  
  <p>and have it processed to return a list/table such as:</p>
  
  <ul>
  <li>Bob and Jane, Bob &amp; Jane, Bob and Sally, Bob &amp; Sally, Robert and Jane, Robert &amp; Jane, Robert and Sally, Robert &amp; Jane</li>
  </ul>
  
  <p>So I can then run a test on each output against the regex to see which returns a value? Clearly in the example all would work but the regex's I have have many 'pipes' and branches and I'd just like to get the entire list and be able to test to make sure ALL of them work.</p>