Yes, but so can YAPE::Regex::Explain.
#!/usr/bin/perl use warnings; use strict; use YAPE::Regex::Explain; print YAPE::Regex::Explain->new('^[0-9]+$')->explain(); print "\n\n"; print YAPE::Regex::Explain->new('^\S{11,}$')->explain(); __END__ The regular expression: (?-imsx:^[0-9]+$) 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 ---------------------------------------------------------------------- [0-9]+ any character of: '0' to '9' (1 or more times (matching the most amount possible)) ---------------------------------------------------------------------- $ before an optional \n, and the end of the string ---------------------------------------------------------------------- ) end of grouping ---------------------------------------------------------------------- The regular expression: (?-imsx:^\S{11,}$) 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 ---------------------------------------------------------------------- \S{11,} non-whitespace (all but \n, \r, \t, \f, and " ") (at least 11 times (matching the most amount possible)) ---------------------------------------------------------------------- $ before an optional \n, and the end of the string ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
-stevieb
In reply to Re: Recognizing numbers
by stevieb
in thread Recognizing numbers
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |