[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Trouble with strings..

Chris Rio

6/30/2008 10:06:00 PM

Mornin' folks - I'm trying to get my head around ruby, writing a few
scripts. This one is meant to head off to a webpage and grab a big
table, which it does. The problem is that I don't know how to
specifically grab that entire table, but I can manage to grab the
content based on classes.

Doing it this way however, I end up not grabbing some of the table tags
- so I need to replace them:

http://pastie.textmate....

All of the methods I have used thus far end up parsing that string, even
though it's quoted up and I want it to be treated purely as a string.
Ruby throws exceptions at me as it tries to parse a string I just want
dumped into the text file in its entirety.

Any thoughts? :)

Cheers folks

Chris R
--
Posted via http://www.ruby-....

1 Answer

Chris Rio

6/30/2008 10:15:00 PM

0

Chris Rio wrote:
> Mornin' folks - I'm trying to get my head around ruby, writing a few
> scripts. This one is meant to head off to a webpage and grab a big
> table, which it does. The problem is that I don't know how to
> specifically grab that entire table, but I can manage to grab the
> content based on classes.
>
> Doing it this way however, I end up not grabbing some of the table tags
> - so I need to replace them:
>
> http://pastie.textmate....
>
> All of the methods I have used thus far end up parsing that string, even
> though it's quoted up and I want it to be treated purely as a string.
> Ruby throws exceptions at me as it tries to parse a string I just want
> dumped into the text file in its entirety.
>
> Any thoughts? :)
>
> Cheers folks
>
> Chris R

Figured it out. aFile.puts "string" works like a charm.

What a dumby :P
--
Posted via http://www.ruby-....