[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: What's the best way of parsing this string?

Austin Ziegler

2/13/2007 1:17:00 AM

On 2/12/07, Dave Hoefler <dhoefler@gmail.com> wrote:
> I have a question about string search and replacement. Let's say I have this
> string that contains 2 <object> links for embedding youtube videos amongst
> some other random text.

I haven't used it yet, but I hear really good things about Hpricot.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

1 Answer

Marcello Barnaba

2/13/2007 3:01:00 AM

0

Hi,

On Tuesday 13 February 2007 02:16, Austin Ziegler wrote:
> On 2/12/07, Dave Hoefler <dhoefler@gmail.com> wrote:
> > I have a question about string search and replacement. Let's say I have
> > this string that contains 2 <object> 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.ne...
[2] http://www.getfi...
[3] version 1.0 is simply *awesome*
--
pub 1024D/8D2787EF 723C 7CA3 3C19 2ACE 6E20 9CC1 9956 EB3C 8D27 87EF