From: Michal Suchanek Date: 2007-12-11T09:50:09+09:00 Subject: Re: [QUIZ] Word Loop (#149) On 11/12/2007, Joe wrote: > /(.*?)(.)(.(?:..)+?)\2(.*)/i > > break it up: > (.*?) looks for a non-greedy string of anything > (.) any character > (.(?:..)+?) non-greedy matching of an odd number of characters. I'm > not sure what the ?: adds to the regular expression. > I got this: "(?: ) grouping without backreferences" from here: > http://www.zenspider.com/Languages/Ruby/QuickRef.html#11 Yes, makes sense. This group would not be used in the match result. > \2 matches the any character from before I wonder if these are still regular epxpressions with those backreferences. > (.*) a string of any length at the end > > i - at the end that means case insensitive. > > Joe Thanks for the nice explanation. Michal