title: Generating strings from regular expression in JavaScript
body: <p>I think it can be done by generating strings using brute force and then try to match them to the supplied regex and printing if match. </p>
  
  <p>But is there a better way to do this?</p>
  
  <p>Regex are used to test if a string matches a pattern.
  I am aware of that. I thought it would be interesting to do it the way around.</p>