From: Phrogz Date: 2007-05-16T02:15:05+09:00 Subject: Re: Regex html On May 15, 9:50 am, "M. R." wrote: > I want to filter the content of a body-Tag in html. How can I do this > with regular expression? > > @h = Net::HTTP.new(url, 80) > @response = @h.get(file, nil) > > if response.message == "OK" > @body_content = response.scan(/..................../).to_s > end Assuming your HTML is valid, then simply: @body_content = response[ /]*>(.+?)/m, 1 ]