From: ts Date: 2001-12-12T15:45:23+09:00 Subject: [ruby-talk:28320] Re: group substitution doesn't work in character classes? >>>>> "T" == Thom Harp writes: T> Is this a bug or is it expected that group substitution doesn't work in T> character classes? This is expected. Try it with puts %q|'a"b'c"d'e"|.sub(/(['"]).*?\1/, "X") Guy Decoux