my $str = 'The rabbits is $10 and the dogs are $20. The phone number is 555-1212.'; # updated: thanks to davido to point out the interpolation # of $10 and $20 in my double quoted string. I have changed # the double quote to single quote. my @capture = $str =~ /(rabbits|dogs|\d+-\d+)/g; print "$_\n" for @capture;