From: Matt Slay Date: 2010-12-16T00:45:50+09:00 Subject: Re: Split a string at a certain character > \d+ means "a digit, one or more times" > > (?: ... ) makes a non-capturing group > > (?: ... )? means "this group 0 or 1 times" > > So the part of your regexp where you have > > (?:\d+)? > > says "one or more digits, 0 or more times". Ruby is pointing out that > this is a convoluted way of saying "0 or more digits", and is optimising > it to: > > \d* > > (where '*' means 0 or more times) I see now. I made this change and the message has gone away. Thanks fo taking the time to give such a thorough explanation. -- Posted via http://www.ruby-forum.com/.