[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Is there a Ruby library that does HTML entity parsing?

Joe OBrien

4/28/2005 4:45:00 PM

>This can also be done using File.split / dirname /
>basename:
>
>File.dirname "http://foo.com/bar/stuff....
>#=> "http://foo.com...
>
>File.basename "http://foo.com/bar/stuff....
>#=> "stuff.html"
>
>File.split "http://foo.com/bar/stuff....
>#=> ["http://foo.com..., "stuff.html"]
>
>File.join(
File.dirname("http://foo.com/bar/doc....),
"relative_link.html" )
># => "http://foo.com/bar/relative_link....
>
>Though that probably breaks on Windows since it has
>backslashes for
>directory separators.

---------------------

Using WinXP Pro (but don't tell me friends) and it
worked like a champ. I tried it in irb and as a
script in a file and both of them worked well.

Thanks, didn't think to use this library on URL's.

-Joe

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail...