From: Marcello Barnaba Date: 2007-02-13T12:00:33+09:00 Subject: Re: What's the best way of parsing this string? Hi, On Tuesday 13 February 2007 02:16, Austin Ziegler wrote: > On 2/12/07, Dave Hoefler wrote: > > I have a question about string search and replacement. Let's say I have > > this string that contains 2 links for embedding youtube videos > > amongst some other random text. > > I haven't used it yet, but I hear really good things about Hpricot. i've used it[1], i needed to pull out some statistical data off a bunch of html pages slightly different from one to another, combined with firebug[2]'s ability to generate xpath expression by simply pointing at an element[3], and recent hpricot's support for xpath indices.. it should be a matter of minutes of automatically extracting anything you want from any html page. :) [1] http://code.whytheluckystiff.net/hpricot/ [2] http://www.getfirebug.com/ [3] version 1.0 is simply *awesome* -- pub 1024D/8D2787EF 723C 7CA3 3C19 2ACE 6E20 9CC1 9956 EB3C 8D27 87EF