From: Alpha Blue Date: 2009-08-15T12:45:36+09:00 Subject: Re: regexp issue on parsing from file Okay I'm getting closer.. counter = 1 name_re = /(.*)\[(.*)\{/ File.open("census.lua", "r") do |infile| while (line = infile.gets) if (line =~ name_re) puts "#{counter}: #{line}" counter = counter + 1 end end end This gets me the data from the one line: ["Name"] = { ["NameTwo"] = { -- Posted via http://www.ruby-forum.com/.