From: "John W. Long" Date: 2006-05-25T01:06:01+09:00 Subject: Re: RegExp Problem A LeDonne wrote: > It looks to me like backreferences are not available inside character > classes, because the backslash sequence is interpreted as a character. > So in a character class, \1 is the same as \001, commonly known as > control-A. > > irb(main):018:0> re = /(a)([\1]) test/ > => /(a)([\1]) test/ > irb(main):019:0> md = re.match "aa test" > => nil > irb(main):020:0> md = re.match "a test" > => nil > irb(main):021:0> md = re.match "a1 test" > => nil > irb(main):022:0> md = re.match "a\1 test" > => # > irb(main):023:0> md[0] > => "a\001 test" > irb(main):024:0> md[1] > => "a" > irb(main):025:0> md[2] > => "\001" That makes perfect sense. So how do I get it to do what I want? -- John Long http://wiseheartdesign.com http://radiantcms.org