inblosam has asked for the wisdom of the Perl Monks concerning the following question:
<td colspan="6" bgcolor="#FFFFCC" class="SmallPrintBold"><a href="Plat +formProductDetail.jsp?siteId=1&jid=3X223CA2D129EF993166683A761A7X4D&z +sortParams=true&productId=26636&productType=2&catalog=1&authorId=9364 +0§ionId=0&platformId=1" >inMeeting</a> </td>
use LWP::Simple; my %categories; my $page = get('http://www.handango.com/PlatformTopSoftware.jsp?author +Id=93640&zsortParams=true'); while ($page =~ / productId=(\d+) ([^<]*) < /xig) { $categories{$1} = $2; print "[$1] and [$2]\n"; } foreach my $idkey (keys %categories) { print "$idkey,$categories{$idkey}\n"; }
[25297] and [&productType=2&catalog=1&authorId=93640§ionId=0&platf +ormId=1" >inChemLab] [25297] and [">] [26636] and [&productType=2&catalog=1&authorId=93640§ionId=0&platf +ormId=1" >inMeeting] [26636] and [">] [26632] and [&productType=2&catalog=1&authorId=93640§ionId=0&platf +ormId=1" >inTimeCard] [26632] and [">] [26641] and [&productType=2&catalog=1&authorId=93640§ionId=0&platf +ormId=1" >inShop] [26641] and [">] 26636,"> 26632,"> 26641,"> 25297,">
26636,inMeeting 26641,inShop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex refining...
by Joost (Canon) on Jun 11, 2002 at 15:47 UTC | |
by inblosam (Monk) on Jun 11, 2002 at 15:52 UTC | |
|
Re: Regex refining...
by neilwatson (Priest) on Jun 11, 2002 at 16:11 UTC |