in reply to \1, \2, \3, ... inside of a character class

I have come accross that problem before, \1, \2... are not interpolated inside a character class (or at least not properly). You can use them _outside_ of the class though: (.)([\w]|\1) for example should work fine.