$text =~ /\b(\d+)/ #### if ($text =~ /\b(\d+)\b/) { print("Matched $1\n"); } #### # The first standalone number. $text =~ /\b(\d+)\b/ #### # By context. $text =~ /(\d+) months? old/ #### # The last number. $text =~ /^.*\b(\d+)/
## if ($text =~ /\b(\d+)\b/) { print("Matched $1\n"); } ##
## # The first standalone number. $text =~ /\b(\d+)\b/ ##
## # By context. $text =~ /(\d+) months? old/ ##
## # The last number. $text =~ /^.*\b(\d+)/