From: Brian Candler Date: 2010-12-16T00:21:11+09:00 Subject: Re: Split a string at a certain character Matt Slay wrote in post #968427: > However, I've notice that the server console is spitting out this > message below with every request hit that comes in: > > warning: nested repeat operator + and ? was replaced with '*': > /\A((?:\d+)?(?:\.\d+)?)\s*([a-z]{1,2}\d+)\z/ > > The whole process works fine, and but I am confused as to what this > means. \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) -- Posted via http://www.ruby-forum.com/.