use YAPE::Regex::Explain; print YAPE::Regex::Explain->new(qr/[^\d\D]/)->explain; __END__ The regular expression: (?-imsx:[^\d\D]) 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): ---------------------------------------------------------------------- [^\d\D] any character except: digits (0-9), non- digits (all but 0-9) ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------