See also the built-in quotemeta function (which does something very similar to \Q ... \E).
Not only similar. quotemeta is the function implementing the \Q escape, according to quotemeta.
Alexander
In reply to Re^2: Switch/Format to not interpret metacharacters in regex?
by afoken
in thread Switch/Format to not interpret metacharacters in regex?
by mis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |