From: Michael Cook Date: 2001-12-21T01:18:56+09:00 Subject: [ruby-talk:29139] Re: Math with RexExps (was: But is it Fun?) Marko Schulz writes: > Changing your > /^(11+)\1+$/ > into > /^(1{2,})\1+$/ > still lets the program run correctly. > > But when I tried the following > /^(1{2,}){2,}$/ > it didn't anymore. looks like you made two mistakes in that last transformation: 1. you dropped the \1 2. x+ is equivalent to x{1,} not x{2,} so you should have ended up with: /^(1{2,})\1{1,}$/ m.