From: RichardOnRails Date: 2007-11-21T10:20:05+09:00 Subject: Re: False positives in editing data On Nov 20, 10:22 am, Harry Kakueki wrote: > > Hi Ryan, > > > > But, just in case you are interested in looking at it from a little > > > different view.... > > > It is not a complete solution, just an idea. > > > I AM interested, and it's a great idea. Real Ruby rather than my C- > > flavored Ruby :-) > > > Just for our mutual amusement, I replaced your first criterion: > > > err1 = inp.select{|a| a =~ /^0|\.0/} > > > with: > > > err1 = inp.select{|a| a =~ /^0|^\d*\.0/} > > > to preclude false hits where the text proper might contain ".0", e.g., > > "7How to get 5.05% interest" > > > Bottom line: Your code is what I really need. Thanks, again. > > > Best wishes, > > Richard > > Yeah, you need to modify the regular expressions and whatever to fit > your requirements. > Like I said, it's not a complete solution, just an idea you can use. > > By the way, stop calling me Shirley. :) > And stop calling me Ryan. :) > > Good luck, > > Harry > > -- > A Look into Japanese Ruby List in Englishhttp://www.kakueki.com/ruby/list.html Hi H