On Wed, Oct 15, 2014 at 2:22 AM, Eirik Berg Hanssen < Eirik-Berg.Hanssen@allverden.no> wrote: > ... and yes, this seems to contradict the documentation's "not > usable within a bracketed character class". > "Seem" is right. The documentation is correct. \Q is not recognized in character classes. $ perl -we'$_ = q{[\Qa-z]}; qr/$_/' Unrecognized escape \Q in character class passed through in regex; marked by <-- HERE in m/[\Q <-- HERE a-z]/ at -e line 1. In fact, \Q is not recognized in regex, period. $ perl -we'$_ = q{\Q.}; qr/$_/' Unrecognized escape \Q passed through in regex; marked by <-- HERE in m/\Q <-- HERE ./ at -e line 1. \Q..\E are a feature of double quoted string literals and regex literals; they have no thing to do with regular expressions. If you have one in your regular expression, it's an error. That said, the documentation mentioned by the OP could definitely make this clearer. - EricThread Previous | Thread Next