title: Regular expression: language generator
body: <p>Given a regular expression in C#, is there a way to generate a word that is accepted by this regular expression? </p>
  
  <p>For instance, let's consider:</p>
  
  <pre><code>[ab]c*b*
  </code></pre>
  
  <p>Is there a function that can automatically generate a enumeration like:</p>
  
  <pre><code>a
  b
  ac
  ab
  bc
  bb
  acb
  bcb
  acc
  bcc
  ...
  </code></pre>
  
  <p>Obviously this list being infinite of potentially of as-long-as-you-want words, the generator would have to be smart in order to output things from the simplest to the most complex, without being trapped in infinite loops.</p>
  
  <p>I think this would be a useful tool in order to validate regular expression. In general it's easy to see that a regular expression accepts words that you planned it would accept. It's usually much more difficult to see what other words it would accept.</p>
  
  <p>EDIT: This question is not about how to do it, but rather: is there anything out there that I could use to do it in C#?</p>