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

I've never seen it documented, but what would it mean if they were interpolated as back references?

By which I mean, if the back reference in question captured two or more characters, would that mean required the character class to match any one of those characters?

I think that the problem would be that character classes are compiled before the regex begins to run. Ie. before the capture has taken place.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
  • Comment on Re: \1, \2, \3, ... inside of a character class