use strict; use warnings; use YAPE::Regex::Explain; print YAPE::Regex::Explain->new('^\d[1]{1}$')->explain(); __END__ The regular expression: (?-imsx:^\d[1]{1}$) 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 ---------------------------------------------------------------------- \d digits (0-9) ---------------------------------------------------------------------- [1]{1} any character of: '1' (1 times) ---------------------------------------------------------------------- $ before an optional \n, and the end of the string ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
In reply to Re: REGEX Match Single Digit
by toolic
in thread REGEX Match Single Digit
by spickles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |