# Trouble with strings

**URL:** <https://www.ruby-forum.com/t/trouble-with-strings/141839>\
**Category:** Ruby\
**Created:** [July 1, 2008, 12:08am UTC](https://www.ruby-forum.com/t/trouble-with-strings/141839 "2008-07-01T00:08:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [July 1, 2008, 12:08am UTC](https://www.ruby-forum.com/t/trouble-with-strings/141839/1 "2008-07-01T00:08:28Z")

</div>

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](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? 🙂

Cheers folks

Chris R

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [July 1, 2008, 12:17am UTC](https://www.ruby-forum.com/t/trouble-with-strings/141839/2 "2008-07-01T00:17:49Z")

</div>

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](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? 🙂
> 
> Cheers folks
> 
> Chris R

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

What a dumby 😛
