Regexp html scraping

Hi,
I've to extract the full html from a website url using regular
expressions or 'net-http'. Can anybody help me with the code to extract
the full html content of a website. I need to use only regexp or
'net:http'

Thanks
Arun Kumar

···

--
Posted via http://www.ruby-forum.com/.

Arun Kumar wrote:

Hi,
I've to extract the full html from a website url using regular
expressions or 'net-http'. Can anybody help me with the code to extract
the full html content of a website. I need to use only regexp or
'net:http'

require 'net/http'

Net::HTTP.start("www.google.com") do |http|
  resp = http.get("/")
  puts resp.body[0..100]
end

--output:--
<html><head><meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1"><title>Google</ti

···

--
Posted via http://www.ruby-forum.com/\.

What kind of question is that? Use net-http OR regular expressions -
I mean, both serve totally different purposes. You cannot exchange
one for the other. You'll have difficulties to obtain the content
using regular expressions only...

Wondering...

robert

···

2009/3/18 Arun Kumar <arunkumar@innovaturelabs.com>:

I've to extract the full html from a website url using regular
expressions or 'net-http'.

--
remember.guy do |as, often| as.you_can - without end