4 ms·
Warp [1] implements this, and also allows you to generate a list of all possible values matching a particular regex (the number of possibilities of course grows
by misterdata 11y ago
Warp [1] implements this, and also allows you to generate a list of all possible values matching a particular regex (the number of possibilities of course grows quite quickly for many regexes!).
[1] https://itunes.apple.com/us/app/warp/id973942134?mt=12 https://itunes.apple.com/us/app/warp/id973942134?mt=12
- arcatek 11y agoI've made a node package that does the same thing, a few years ago: https://github.com/arcanis/pxeger https://github.com/arcanis/pxeger I mainly used it to generate test mail addresses. For example, the following will generate 36 test email addresses: (blue|red|yellow|green).(oak|cedar|willow)@(yahoo.co.uk|google.com|example.org)
- dnet 11y agoExrex does the same in Python and much more: - Generating all matching strings - Generating a random matching string - Counting the number of matching strings - Simplification of regular expressions https://github.com/asciimoo/exrex https://github.com/asciimoo/exrex (AGPL licensed)
- omegote 11y agoThat's cool, thanks. I've discovered sre_parse thanks to that link, so cool too.