use YAPE::Regex::Explain; print YAPE::Regex::Explain->new(qr/^\.{1,2}$/)->explain; __END__ The regular expression: (?-imsx:^\.{1,2}$) 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): ---------------------------------------------------------------------- ^ the beginning of the string ---------------------------------------------------------------------- \.{1,2} '.' (between 1 and 2 times (matching the most amount possible)) ---------------------------------------------------------------------- $ before an optional \n, and the end of the string ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
In reply to Re^4: code explanation
by Anonymous Monk
in thread code explanation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |