[Rails] Parsing useful subtext from text file, and saving it to Mysql.

2014-12-01 Thread George Stoumpos
Hi there, I am trying to figure out how to do something in Rails. Here's the situation: I want to store in the DB (as fields) info found in a text file. I've created a ruby scripted, where I isolate the area with the text I want(just to test, or play around). I need a guideline on the

Re: [Rails] Parsing useful subtext from text file, and saving it to Mysql.

2014-12-01 Thread Vivek Sampara
Hi George, Isolate the area with the text you want , example ? Ideally it looks like you have to grab a book of regular expressions. Cheers Vivek On Mon, Dec 1, 2014 at 4:42 PM, George Stoumpos stog...@gmail.com wrote: Hi there, I am trying to figure out how to do something in Rails.

Re: [Rails] Parsing useful subtext from text file, and saving it to Mysql.

2014-12-01 Thread Walter Lee Davis
On Dec 1, 2014, at 6:12 AM, George Stoumpos stog...@gmail.com wrote: Hi there, I am trying to figure out how to do something in Rails. Here's the situation: I want to store in the DB (as fields) info found in a text file. I've created a ruby scripted, where I isolate the area with the

Re: [Rails] Parsing useful subtext from text file, and saving it to Mysql.

2014-12-01 Thread George Stoumpos
Hi again Isolate the area with the text you want , example ? This is how: def read_file(file_name) temp = File.open(file_name, r).read data = temp.split(\n) lookup_item = temp.match(/\tSystem Information/) puts lookup_item.to_s + --lookup item @my_match =