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
#"",
# ------------------------------------------------------------------
         
    ;;;;;;;;;;

In reply to Re^3: reg-ex pattern with nesting parethesis by Anonymous Monk
in thread reg-ex pattern with nesting parethesis by marscld

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.