in reply to Simple regrep question

I recommend using a "canned" regex to extract all http url's and then use grep to select the .mp3's.
use strict; use warnings; use Regexp::Common qw /URI/; my $string = "xxx http://perlmonks.com yyy http://foo.mp3 zzz"; $_ = $string; my @urls = grep {/\.mp3$/} /($RE{URI}{HTTP})/g; local $" = "\n"; print "@urls\n"; OutPUT: http://foo.mp3

This approach should find all valid http url's with no false matches while saving your hair.

Bill