Is there YAPE::Regex::Explain alternative to python?

Posted by S.Mark on Stack Overflow See other posts from Stack Overflow or by S.Mark
Published on 2010-04-30T07:44:32Z Indexed on 2010/04/30 7:47 UTC
Read the original article Hit count: 131

Filed under:
|
|

Is there perl's YAPE::Regex::Explain alternative to python?

Which could do

\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))
--------------------------------------------------------------------------------
  '                        '\''

© Stack Overflow or respective owner

Related posts about perl

Related posts about regex