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;'