in reply to Regex Quantifiers

If you're wondering what regex mean, try YAPE::Regex::Explain
use YAPE::Regex::Explain; print YAPE::Regex::Explain->new( qr/.*(\d{6,8}).*/ )->explain,"\n"; __END__ The regular expression: (?-imsx:.*(\d{6,8}).*) 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): ---------------------------------------------------------------------- .* any character except \n (0 or more times (matching the most amount possible)) ---------------------------------------------------------------------- ( group and capture to \1: ---------------------------------------------------------------------- \d{6,8} digits (0-9) (between 6 and 8 times (matching the most amount possible)) ---------------------------------------------------------------------- ) end of \1 ---------------------------------------------------------------------- .* any character except \n (0 or more times (matching the most amount possible)) ---------------------------------------------------------------------- ) end of grouping ----------------------------------------------------------------------
To see what is happening, try

use re 'debug';