Hi Monks,
Assume I have a variable $dino that has the value "1000", will $dino match the pattern "\d*"? If so, in my program, why it gives me an empty string after comparing?
my program is below :
my $sentence = "I fear that i will be extinct after 1000 years"; if($sentence =~ /(\d*)/) { print "That said '$1' years.\n"; }
result: That said '' years.
Need your help!!
Thank,
Cindy
In reply to question about the star(*) quantifier by snowsky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |