From: "Peña, Botp" Date: 2007-11-22T12:23:17+09:00 Subject: Re: Interpreting "(.*?)" and "(?:\d+ [.]?)" in REs From: RichardOnRails # 1. "(.*?)", or specifically, the "?" in that expression. # 2. "(?:\d+ [.]?)", or the two question marks in this case. consider regex as another language on its own. basically, it describes string patterns, like a metastring, a string about a string... :) besides the mastering book, the online free perl doc is very informative (and you can download the pdf too; in fact, i'm even tempted to copy it and convert the samples to ruby. is that illegal? :) start here: http://perldoc.perl.org/perlrequick.html then here: http://perldoc.perl.org/perlretut.html http://perldoc.perl.org/perlre.html # input.each do |line| btw, in ruby, you can do DATA.each do ... and you can even do DATA.rewind :) kind regards -botp