List all patterns matching regular expression

I am looking for a way to list all possible patterns from a finite regular expression (without duplicates). Is there an available source?

+3
source share
2 answers

Although it will not cover some advanced features and has its share of other caveats, Regexp :: Genex seems to be close to what you are looking for.

There is also this PerlMonks thread , which is reasonably appropriate (and also explains how Regexp :: Genex might not do for you, and some roll-up alternatives).

, Jeffrey Friedl , /g (? {CODE}) , , ala:

perl -E '$_ = 'Mastering Regular Expressions'; /(\p{L}*)(?{ say qq![$^N]! })(?!)/g;'
+3

Haskell, Perl Regexp::Genex, Github Hackage.

, Regexp:: Genex, " , ".

0

Source: https://habr.com/ru/post/1783641/


All Articles