Dynamically inspecting Regex OP-Codes at runtime?by LanX (Chancellor)
|on Jan 30, 2013 at 11:04 UTC||Need Help??|
LanX has asked for the
wisdom of the Perl Monks concerning the following question:
ATM I need plenty of hacks to be able to dynamically see the OP-Tree of a Regex at runtime cause use re 'debug' emits the code of a regex at compile time to STDERR.
In Re^2: Is there really no @LAST_MATCH_START equivalent for named capture groups? I need to recompile a new regex within an eval while redirecting STDERR to a variable...
Thats hacky and cumbersome!
Is there any simpler or cleaner way to achieve this?