From: "David A. Black" Date: 2009-09-28T22:09:58+09:00 Subject: Re: Regular expression question HI -- On Mon, 28 Sep 2009, Robert Klemme wrote: > On 09/27/2009 08:45 PM, Jim Burgess wrote: >> Thanks for the comprehensive explanation. That helps me greatly. >> I am currently reading a ruby book (in German, just to make things a bit >> simpler) and am on the reg ex chapter. It's hardcore! >> Thanks again. > > Es gibt ja auch noch de.comp.lang.ruby. :-) > > Btw, David you wrote > >> In this particular case, the first + doesn't matter, because the >> pattern will keep going until it finds a space, so normal rules of >> (non-)greediness don't apply. > > I believe you meant "the first ? doesn't matter" - as leaving out the "+" > would indeed make a difference but it's the non greediness addition which > does not make a difference to matching. Yes -- I did indeed mean ?, not +. Thanks. David -- David A. Black, Director Ruby Power and Light, LLC (http://www.rubypal.com) Ruby/Rails training, consulting, mentoring, code review Book: The Well-Grounded Rubyist (http://www.manning.com/black2)