Jim Kronhamn wrote:
> Hello!
> 
> I'm trying to do the following:
> 
> I want to scrape something of a webpage. It has a massive content and I
> want to find the thing that comes after the first occourance of "a
> href=" after the occourance of "id=xxx". So:
> 
> ...
> <id=xxx>
> ...
> <a href=??????>
> ...
> 
> How can I do this?
> 
> Thank you!
> 

Jim,

Is the "???" the thing you want to capture? If so, the following should 
do the trick:

if page.body =~ /<id=xxx>.+?<a href=['"]?([^'"\s>]*)/m
     capture = $1
end

If this seems somewhat perlish, it's because a perlmonger taught me this 
line.

Dan