Trouble with strings

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.org/225090

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? :slight_smile:

Cheers folks

Chris R

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.org/225090

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? :slight_smile:

Cheers folks

Chris R

Figured it out. aFile.puts “string” works like a charm.

What a dumby :stuck_out_tongue: