From 36bbe248096ab718da92e52c9927b81877a3d388 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 28 May 2000 07:29:12 +0000 Subject: [PATCH] fix places that mean C<"word" character> but say C p4raw-id: //depot/perl@6130 --- pod/perlfunc.pod | 2 +- pod/perlre.pod | 6 +++--- pod/perlretut.pod | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 4e67506..f24c1d2 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3426,7 +3426,7 @@ Generalized quotes. See L. =item quotemeta -Returns the value of EXPR with all non-alphanumeric +Returns the value of EXPR with all non-"word" characters backslashed. (That is, all characters not matching C will be preceded by a backslash in the returned string, regardless of any locale settings.) diff --git a/pod/perlre.pod b/pod/perlre.pod index 2db4139..a82ab32 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -169,7 +169,7 @@ You'll need to write something like C. In addition, Perl defines the following: \w Match a "word" character (alphanumeric plus "_") - \W Match a non-word character + \W Match a non-"word" character \s Match a whitespace character \S Match a non-whitespace character \d Match a digit character @@ -180,7 +180,7 @@ In addition, Perl defines the following: equivalent to C<(?:\PM\pM*)> \C Match a single C char (octet) even under utf8. -A C<\w> matches a single alphanumeric character, not a whole word. +A C<\w> matches a single alphanumeric character or C<_>, not a whole word. Use C<\w+> to match a string of Perl-identifier characters (which isn't the same as matching an English word). If C is in effect, the list of alphabetic characters generated by C<\w> is taken from the @@ -377,7 +377,7 @@ that looks like \\, \(, \), \<, \>, \{, or \} is always interpreted as a literal character, not a metacharacter. This was 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-alphanumeric characters: +use for a pattern. Simply quote all non-"word" characters: $pattern =~ s/(\W)/\\$1/g; diff --git a/pod/perlretut.pod b/pod/perlretut.pod index 5ff4298..66f8179 100644 --- a/pod/perlretut.pod +++ b/pod/perlretut.pod @@ -344,7 +344,7 @@ become the svelte C<[0-9]> and C<[a-z]>. Some examples are /[0-9bx-z]aa/; # matches '0aa', ..., '9aa', # 'baa', 'xaa', 'yaa', or 'zaa' /[0-9a-fA-F]/; # matches a hexadecimal digit - /[0-9a-zA-Z_]/; # matches an alphanumeric character, + /[0-9a-zA-Z_]/; # matches a "word" character, # like those in a perl variable name If C<'-'> is the first or last character in a character class, it is -- 2.7.4