Hello stroke,
See the section “Escape sequences” in perlre#Regular-Expressions, where \Q is defined as follows:
\Q quote (disable) pattern metacharacters until \E
So you need the \E only when what follows contains metacharacters which are meant to behave as metacharacters. A double quote character " is not a metacharacter, so in this case adding the \E makes no difference.
Nevertheless, it’s probably good practice to add it, to make the regex clearer and to guard against bugs in the event that the regex is extended in the future.
See also quotemeta and perlrebackslash.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^3: Return to original loop
by Athanasius
in thread Return to original loop
by stroke
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |