FFSparky has asked for the wisdom of the Perl Monks concerning the following question:
$String = "sdalfkjsdlfjasl;kjsdflkj12345678dskajhjkhddsfkjhh"; print "\n\n\$String = ".$String."\n\n"; ($Regex1) = ($String =~ /.*(\d{6,8}).*/); print "\$Regex1 = ".$Regex1."\n";<br> print "\nJust to check:\n\$1 = ".$1."\n"; print "\$2 = ".$2."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex Quantifiers
by kennethk (Abbot) on Jul 15, 2009 at 19:39 UTC | |
|
Re: Regex Quantifiers
by toolic (Bishop) on Jul 15, 2009 at 19:40 UTC | |
|
Re: Regex Quantifiers
by NetWallah (Canon) on Jul 15, 2009 at 19:44 UTC | |
|
Re: Regex Quantifiers
by AnomalousMonk (Archbishop) on Jul 15, 2009 at 19:45 UTC | |
|
Re: Regex Quantifiers
by Anonymous Monk on Jul 15, 2009 at 19:52 UTC | |
|
Re: Regex Quantifiers
by FFSparky (Acolyte) on Jul 15, 2009 at 20:23 UTC | |
|
Re: Regex Quantifiers
by biohisham (Priest) on Jul 15, 2009 at 20:36 UTC |