From: "Kai König" Date: 2009-07-29T02:20:36+09:00 Subject: Re: Regexp Help Why not => irb(main):001:0> require 'nokogiri' => true irb(main):002:0> doc = Nokogiri::HTML(<<-eohtml) irb(main):003:1" irb(main):004:1" irb(main):005:1" Bla irb(main):006:1" irb(main):007:1" irb(main):008:1" eohtml doc.xpath('//a')[0].attributes["href"].to_s => "http://mysite.com" http://tenderlovemaking.com/2008/10/30/nokogiri-is-released/ Cheers On 28.07.2009, at 08:12, Jillian Kozyra wrote: > Hi, > > I am looking for a way to do the following: > > I have some html in strings, mostly links (i.e. href="http://mysite.com">). I need to delete these lines. I've been > trying to do this, but it's not working out: > > question.gsub! ("$/i", "") > or also: question.gsub! ("$/i", "") > > (and various permutations of these two). > > How would one go about this? > > Thanks, > Jillian > -- > Posted via http://www.ruby-forum.com/. >