\1 can capture much more than a single character, so, it can't be used inside a character class because it doesn't represent a character, but a string

It's not a problem, see perlretut

/[\]c]def/; # matches ']def' or 'cdef' $x = 'bcr'; /[$x]at/; # matches 'bat', 'cat', or 'rat' /[\$x]at/; # matches '$at' or 'xat' /[\\$x]at/; # matches '\at', 'bat, 'cat', or 'rat'

In reply to Re^2: \1, \2, \3, ... inside of a character class by ccn
in thread \1, \2, \3, ... inside of a character class by ccn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":