I'm trying to extract the age digits only but it extracts the wrong digits (19) .my $text = 'my model TT1986 is 6 months old"; #my $text = 'my model TT1986 is 12 months old"; $text =~ /(\d?\d)/; print $1;
doesn't print anything. What's a girl supposed to do?? :)$text =~ /^\b(\d?\d)/; print $1;
In reply to Regex extracting a number from numbers and text by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |