Install YAPE::Regex::Explain, because
use YAPE::Regex::Explain; print YAPE::Regex::Explain->new(qr~(?:tar\.gz|[^.]+)~)->explain; __END__ The regular expression: (?-imsx:(?:tar\.gz|[^.]+)) 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, but do not capture: ---------------------------------------------------------------------- tar 'tar' ---------------------------------------------------------------------- \. '.' ---------------------------------------------------------------------- gz 'gz' ---------------------------------------------------------------------- | OR ---------------------------------------------------------------------- [^.]+ any character except: '.' (1 or more times (matching the most amount possible)) ---------------------------------------------------------------------- ) end of grouping ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
In reply to Re^5: Splitting an url in its components
by Anonymous Monk
in thread Splitting an url in its components
by baurel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |