Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I know how to apply one regex to a variable and either s/// one or many things, but I only know how to match ONE thing from it.
What I want to do is take a page from LWP and get all the links that look like page.php?id=379744077, or page.php?id=#########.
Each page will have TONS of matches, but I'm not sure how to handle this dynamically.
If it's possible, it'd be nice storing all the matches inside an array.
use LWP::Simple; my start = "link.here"; my $content = get($start); $content =~ m//# ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: newbie to regex: all matches
by graff (Chancellor) on Mar 10, 2006 at 02:01 UTC | |
|
Re: newbie to regex: all matches
by GrandFather (Saint) on Mar 10, 2006 at 00:32 UTC | |
by Anonymous Monk on Mar 10, 2006 at 00:36 UTC | |
by GrandFather (Saint) on Mar 10, 2006 at 01:03 UTC | |
|
Re: newbie to regex: all matches
by Anonymous Monk on Mar 10, 2006 at 00:32 UTC | |
|
Re: newbie to regex: all matches
by Anonymous Monk on Mar 10, 2006 at 00:13 UTC | |
by sulfericacid (Deacon) on Mar 10, 2006 at 01:00 UTC | |
by duckyd (Hermit) on Mar 10, 2006 at 05:56 UTC |