diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-02-13 18:44:35 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-02-15 18:02:34 -0700 |
commit | 736fe711926e145fd5999cb7df97cd35279ddc53 (patch) | |
tree | f2b27d666c006401bb694624bfdda7bae5ee808f /pod/perlrebackslash.pod | |
parent | 4cd6899110c0316028f08dd4692f66595f314fc3 (diff) | |
download | perl-736fe711926e145fd5999cb7df97cd35279ddc53.tar.gz |
Clarify some quotemeta docs
Diffstat (limited to 'pod/perlrebackslash.pod')
-rw-r--r-- | pod/perlrebackslash.pod | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod index 98435e5b8c..f81af0c6dd 100644 --- a/pod/perlrebackslash.pod +++ b/pod/perlrebackslash.pod @@ -90,7 +90,8 @@ as C<Not in [].> \o{} Octal escape sequence. \p{}, \pP Character with the given Unicode property. \P{}, \PP Character without the given Unicode property. - \Q Quotemeta till \E. Not in []. + \Q Quote (disable) pattern metacharacters till \E. Not + in []. \r Return character. \R Generic new line. Not in []. \s Character class for whitespace. @@ -331,11 +332,14 @@ them, until either the end of the pattern or the next occurrence of C<\E>, whichever comes first. They provide functionality similar to what the functions C<lc> and C<uc> provide. -C<\Q> is used to escape all characters following, up to the next C<\E> -or the end of the pattern. C<\Q> adds a backslash to any character that -isn't a letter, digit, or underscore. This ensures that any character -between C<\Q> and C<\E> shall be matched literally, not interpreted -as a metacharacter by the regex engine. +C<\Q> is used to quote (disable) pattern metacharacters, up to the next +C<\E> or the end of the pattern. C<\Q> adds a backslash to any character +that could have special meaning to Perl. In the ASCII range, it quotes +every character that isn't a letter, digit, or underscore. See +L<perlfunc/quotemeta> for details on what gets quoted for non-ASCII +code points. Using this ensures that any character between C<\Q> and +C<\E> will be matched literally, not interpreted as a metacharacter by +the regex engine. C<\F> can be used to casefold all characters following, up to the next C<\E> or the end of the pattern. It provides the functionality similar to |