Easily fixed by excluding whitespace:
#! perl use strict; use warnings; for ('Look here: http://example1.com/cool.mp3 for a great listen!', 'http://example.com/ this is some text about my .mp3 files.') { print "Match: $1\n" if m!\b(http://\S*?\.mp3)\b!; }
Output:
18:26 >perl 1664_SoPW.pl Match: http://example1.com/cool.mp3 18:26 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^2: Simple regrep question
by Athanasius
in thread Simple regrep question
by monkeybus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |