fent / randexp.js

Create random strings that match a given regular expression.

Home Page:http://fent.github.io/randexp.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generating all matches of a regex

jarble opened this issue · comments

Is it possible to generate a list of all matches (instead of just one match) of a regular expression using randexp.js?

For example, this regex: /(red|gray) (wolf|fox)/ would have these possible matches:
["red wolf","red fox","gray wolf","gray fox"]