Is there Perl's YAPE::Regex::Explain alternative to python?
- by S.Mark
Is there Perl's YAPE::Regex::Explain alternative to python?
For example, which could do following regex
\w+=\d+|\w+='[^']+'
to explanations like this
NODE EXPLANATION
--------------------------------------------------------------------------------
\w+ word characters (a-z, A-Z, 0-9, _) (1 or
more times (matching the most amount
possible))
--------------------------------------------------------------------------------
= '='
--------------------------------------------------------------------------------
\d+ digits (0-9) (1 or more times (matching
the most amount possible))
--------------------------------------------------------------------------------
| OR
--------------------------------------------------------------------------------
\w+ word characters (a-z, A-Z, 0-9, _) (1 or
more times (matching the most amount
possible))
--------------------------------------------------------------------------------
=' '=\''
--------------------------------------------------------------------------------
[^']+ any character except: ''' (1 or more times
(matching the most amount possible))
--------------------------------------------------------------------------------
' '\''