use strict; use YAPE::Regex::Explain; print YAPE::Regex::Explain->new(qr'lo/gw|')->explain(); __OUTPUT__ The regular expression: (?-imsx:lo/gw|) 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): ---------------------------------------------------------------------- lo/gw 'lo/gw' ---------------------------------------------------------------------- | OR ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------