in reply to Re: how to extract string by possible groupings?
in thread how to extract string by possible groupings?

thanks! this is really clear and easy to understand. although, what does the symbol ":?" mean? also..i didn't even know qr can prepare regex pattern.. I guess I'm too rusty in perl!!
  • Comment on Re^2: how to extract string by possible groupings?

Replies are listed 'Best First'.
Re^3: how to extract string by possible groupings?
by LanX (Saint) on Jun 03, 2014 at 02:37 UTC
    > what does the symbol ":?" mean

    its (?:...) not :?

    see (like already mentioned) perlre#Extended-Patterns

    Cheers Rolf

    (addicted to the Perl Programming Language)

Re^3: how to extract string by possible groupings?
by Laurent_R (Canon) on Jun 03, 2014 at 06:49 UTC
    (?:...) is used for non capturing parentheses. This is useful when you need to regroup a subpattern (for example for an alternation or a quantification), but are not interested in capturing the content in $1, $2, etc.