in reply to Re^2: reg-ex pattern with nesting parethesis
in thread reg-ex pattern with nesting parethesis

perlintro#Parentheses for capturing and perlrequick#Extracting matches and Re^3: My Favourite Regex Tools (Was: Parsing a Variable Format String)
         
    # my $regstr = join '', ; # The regular expression (PPI::Token::Regexp::Match): ; #
# /([a-z]+(\d+))/
#
# matches as follows:
#r: PPIx::Regexp / PPI::Token::Regexp::Match
#r= "/([a-z]+(\\d+))/"
#
          "",
      # address=/1/C0 ; xRe::Token::Structure ; Represent structural elements.
#"",
# ------------------------------------------------------------------
               
       # 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::Structure::Capture ; Represent capture parentheses.
# number=1 alias "$1" or "\1"
# ------------
                  "(",
          # address=/1/C1/C0/S0 ; xRe::Token::Structure ; Represent structural elements.
#"(",
# ------------------------------------------------------------------
                           
             # address=/1/C1/C0/C0 ; xRe::Structure::CharClass ; a character class
# ------------------
                        "[",
             # address=/1/C1/C0/C0/S0 ; xRe::Token::Structure ; Represent structural elements.
#"[",
# ------------------------------------------------------------------
                              "a-z",
                # # address=/1/C1/C0/C0/C0 ; xRe::Node::Range ; a character range in a character class
# code points ord(chr( 97 )) to ord(chr( 122 ))
# code points "\N{U+0061}" to "\N{U+007A}"
# characters "LATIN SMALL LETTER A" to "LATIN SMALL LETTER Z"
#"a-z",
# ------------------------------------------------------------------
                        "]",
             # address=/1/C1/C0/C0/F0 ; xRe::Token::Structure ; Represent structural elements.
#"]",
# ------------------------------------------------------------------
                      "+",
            # # address=/1/C1/C0/C1 ; xRe::Token::Quantifier ; Represent an atomic quantifier.
# match preceding pattern 1 or more times
# (matching the most amount possible)
# match the preceding pattern at address=/1/C1/C0/C0
#"+",
# ----------------
                           
             # # address=/1/C1/C0/C2 ; xRe::Structure::Capture ; Represent capture parentheses.
# number=2 alias "$2" or "\2"
# ------------------
                        "(",
             # address=/1/C1/C0/C2/S0 ; xRe::Token::Structure ; Represent structural elements.
#"(",
# ------------------------------------------------------------------
                            "\\d",
               # # address=/1/C1/C0/C2/C0 ; xRe::Token::CharClass::Simple ; This class represents a simple character class
# \d Match a decimal digit character.
# [0-9]
# L<perldebguts/DIGIT>
# L<perlrecharclass/\d>
# L<perlrebackslash/\d>
#"\\d",
# ----------------------
                            "+",
               # # address=/1/C1/C0/C2/C1 ; xRe::Token::Quantifier ; Represent an atomic quantifier.
# match preceding pattern 1 or more times
# (matching the most amount possible)
# match the preceding pattern at address=/1/C1/C0/C2/C0
#"+",
# ----------------------
                        ")",
             # # address=/1/C1/C0/C2/F0 ; xRe::Token::Structure ; Represent structural elements.
# end of grouping for number=2 alias "$2" or "\2"
#")",
# ------------------------------------------------------------------
                  ")",
          # # address=/1/C1/C0/F0 ; xRe::Token::Structure ; Represent structural elements.
# end of grouping for number=1 alias "$1" or "\1"
#")",
# ------------------------------------------------------------------
            "/",
       # address=/1/C1/F0 ; xRe::Token::Delimiter ; Represent the delimiters of the regular expression
#"/",
# ------------------------------------------------------------------
          "",
      # address=/1/C2 ; xRe::Token::Modifier ; Represent 1)embedded pattern-match modifiers or 2)(trailing) modifiers for operators match, substitution, regexp constructor
#"",
# ------------------------------------------------------------------
         
    ;;;;;;;;;;
  • Comment on Re^3: reg-ex pattern with nesting parethesis