in reply to Re: page parsing regex
in thread page parsing regex

Hi. I added the ? and made the code easier but it's still not giving way.

while($google_results =~ m|<p class=g><a href=(http://.+?)\sonmousedow +n|gs)

Replies are listed 'Best First'.
Re^3: page parsing regex
by tlm (Prior) on May 12, 2005 at 09:08 UTC

    It works perfectly for me:

    while ( $google_results =~ m|<p class=g><a href=(http://.+?)\sonmousedown|gs) { push @links_found, $1; } print "$_\n" for @links_found; __END__ http://www.ets.org/toefl/ http://www.ets.org/testcoll/ http://www.test.com/

    BTW, it's a bit perverse to pick a character like |, which has a special meaning within regexps, as your delimiter for m.

    the lowliest monk