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...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Is there a Ruby library that does HTML entity parsing?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password