so your foreach makes this is evaluated in list-context and \1 and \2 are passed.use YAPE::Regex::Explain; my $regex=YAPE::Regex::Explain->new(qr/((.))/); print $regex->explain; __END__ The regular expression: (?-imsx:((.))) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- ( group and capture to \1: ---------------------------------------------------------------------- ( group and capture to \2: ---------------------------------------------------------------------- . any character except \n ---------------------------------------------------------------------- ) end of \2 ---------------------------------------------------------------------- ) end of \1 ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
In reply to Re: Double Capturing Parentheses
by eXile
in thread Double Capturing Parentheses
by pbeckingham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |