From: Josh Cheek Date: 2011-02-01T07:08:13+09:00 Subject: Re: Obtaining specific .csv data (one data at a time) --0016361e86ba6df780049b2ba661 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jan 31, 2011 at 2:24 PM, Kamarulnizam Rahim wrote: > Hi Josh, > > Thanks for the post. Problem solved. But i have one little question to > ask. In order to get the data from row[1], i use the following code: > > next unless row[0] =~ /1.[a-z]/ > t = Target.new row[1] > > where '1.[a-z]' will take on any data with number '1'. The problem is, > my csv data on row[1] has data till number '11'. and when i used the > code above, it will take on data on number '1' and '11' as well. How do > i separate this? > > Nizam > > -- > Posted via http://www.ruby-forum.com/. > > In regular expressions, the period will match any character. So you need to escape the period to basically say "match a period" not "match any character" /1\.[a-z]/ --0016361e86ba6df780049b2ba661--