I have read perlre, perlretut, perlop but I have not found a rule of interpolating \1, \2, \3 ... inside of a character class.
Experiment shows that \1 in a character class is interpolated as octal \001 rather than a backreference.
It prints the both lines on my perl v5.8.3print "'\001' match\n" if "'\001'" =~ /(')[\1]\1/; print "''' not match\n" unless "'''" =~ /(')[\1]\1/;
Is this behaviour documented anywhere?
In reply to \1, \2, \3, ... inside of a character class by ccn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |