-
Notifications
You must be signed in to change notification settings - Fork 576
pod and comments: Note escape vs quote #23264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: blead
Are you sure you want to change the base?
Conversation
This adds a bit of text about metacharacters that was missing from this introductory pod.
Fixes Perl#15221 The documentation and comments was misleading about conflating quoting a metacharacter and escaping it. Since \Q stands for quote, we have to continue to use that terminology. This commit clarifies that the two terms are often equivalent.
want to match on, where "thing" means either a literal character, one | ||
of the metacharacters listed above, or a group of characters or | ||
metacharacters in parentheses. | ||
Note that in the above, C<$> doesn't mean a dollar sign. Similarly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps slightly clearer to say, "$
doesn't match a dollar sign."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if so, "mean" could be replaced with "match" to clarify some other statements in this section.
once used in a common idiom to disable or quote the special meanings | ||
of regular expression metacharacters in a string that you want to | ||
use for a pattern. Simply quote all non-"word" characters: | ||
=head2 Quoting (or escaping) metacharacters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing headings is perilous, but I found no instances of this being linked to directly on CPAN.
Fixes #15221
The documentation and comments was misleading about conflating quoting a metacharacter and escaping it. Since \Q stands for quote, we have to continue to use that terminology. This commit clarifies that the two terms are often equivalent.