in reply to Re^2: Regex explanation
in thread Regex explanation

YAPE::Regex::Explain doesn't handle ...

Luckily :)

other regex tools, ppixregexplain.pl ...

         
    # my $regstr = join '', ; # The regular expression (PPI::Token::Regexp::Substitute): ; #
# s/.*\/(.*).lib/$1/
#
# matches as follows:
#r: PPIx::Regexp / PPI::Token::Regexp::Substitute
#r= "s/.*\\/(.*).lib/\$1/"
#
          "s",
      # address=/1/C0 ; xRe::Token::Structure ; Represent structural elements.
#"s",
# ------------------------------------------------------------------
               
       # address=/1/C1 ; xRe::Structure::Regexp ; Represent the top-level regular expression
# ------
            "/",
       # address=/1/C1/S0 ; xRe::Token::Delimiter ; Represent the delimiters of the regular expression
#"/",
# ------------------------------------------------------------------
                ".",
         # # address=/1/C1/C0 ; xRe::Token::CharClass::Simple ; This class represents a simple character class
# any character except \n
# L<perlrecharclass/.>
# L<perlrebackslash/.>
#".",
# ----------
                "*",
         # # address=/1/C1/C1 ; xRe::Token::Quantifier ; Represent an atomic quantifier.
# match preceding pattern 0 or more times
# (matching the most amount possible)
# match the preceding pattern at address=/1/C1/C0
#"*",
# ----------
                "\\/",
         # # address=/1/C1/C2 ; xRe::Token::Literal ; a literal character
# ordinal= ord( chr( 47 ) ) alias \N{U+002F} alias \057 alias SLASH alias /
#"\\/",
# ------------------------------------------------------------------
                     
          # # address=/1/C1/C3 ; xRe::Structure::Capture ; Represent capture parentheses.
# number=1 alias "$1" or "\1"
# ------------
                  "(",
          # address=/1/C1/C3/S0 ; xRe::Token::Structure ; Represent structural elements.
#"(",
# ------------------------------------------------------------------
                      ".",
            # # address=/1/C1/C3/C0 ; xRe::Token::CharClass::Simple ; This class represents a simple character class
# any character except \n
# L<perlrecharclass/.>
# L<perlrebackslash/.>
#".",
# ----------------
                      "*",
            # # address=/1/C1/C3/C1 ; xRe::Token::Quantifier ; Represent an atomic quantifier.
# match preceding pattern 0 or more times
# (matching the most amount possible)
# match the preceding pattern at address=/1/C1/C3/C0
#"*",
# ----------------
                  ")",
          # # address=/1/C1/C3/F0 ; xRe::Token::Structure ; Represent structural elements.
# end of grouping for number=1 alias "$1" or "\1"
#")",
# ------------------------------------------------------------------
                ".",
         # # address=/1/C1/C4 ; xRe::Token::CharClass::Simple ; This class represents a simple character class
# any character except \n
# L<perlrecharclass/.>
# L<perlrebackslash/.>
#".",
# ----------
                "l",
         # # address=/1/C1/C5 ; xRe::Token::Literal ; a literal character
# ordinal= ord( chr( 108 ) ) alias \N{U+006C} alias \154 alias LATIN SMALL LETTER L alias l
#"l",
# ------------------------------------------------------------------
                "i",
         # # address=/1/C1/C6 ; xRe::Token::Literal ; a literal character
# ordinal= ord( chr( 105 ) ) alias \N{U+0069} alias \151 alias LATIN SMALL LETTER I alias i
#"i",
# ------------------------------------------------------------------
                "b",
         # # address=/1/C1/C7 ; xRe::Token::Literal ; a literal character
# ordinal= ord( chr( 98 ) ) alias \N{U+0062} alias \142 alias LATIN SMALL LETTER B alias b
#"b",
# ------------------------------------------------------------------
            "/",
       # address=/1/C1/F0 ; xRe::Token::Delimiter ; Represent the delimiters of the regular expression
#"/",
# ------------------------------------------------------------------
               
       # address=/1/C2 ; xRe::Structure::Replacement ; Represent the replacement in s///
# ------
                "\$1",
         # # address=/1/C2/C0 ; xRe::Token::Interpolation ; Represent an interpolation in the PPIx::Regexp package.
# It is a variable! subject to \F\l\u\L\U\Q\E
# L<perlre/\F\l\u\L\U\Q\E>
# It is a variable! whose contents are used as a REPLACEMENT string
#"\$1",
# ------------------------------------------------------------------
            "/",
       # address=/1/C2/F0 ; xRe::Token::Delimiter ; Represent the delimiters of the regular expression
#"/",
# ------------------------------------------------------------------
          "",
      # address=/1/C3 ; xRe::Token::Modifier ; Represent 1)embedded pattern-match modifiers or 2)(trailing) modifiers for operators match, substitution, regexp constructor
#"",
# ------------------------------------------------------------------
         
    ;;;;;;;;;;