in reply to Stumped Regular expressions
use strict; use warnings; my $line_count = 0; open(F, "test.htm"); while(<F>) { my @a = $_ =~ m{(http://hosting/image\d+\.jpg)}g; for my $url (@a) { print "URL [ $url ] found on line ($line_count)\n"; } $line_count++; } close(F);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Stumped Regular expressions
by toolic (Bishop) on Jun 11, 2008 at 16:34 UTC |