diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 07:29:12 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 07:29:12 +0000 |
commit | 36bbe248096ab718da92e52c9927b81877a3d388 (patch) | |
tree | 5e1bb9dc4c234c751e80641edf24939f7b07cd64 /pod/perlre.pod | |
parent | 23724483b0ae0f947e5099eec2b292e01c1fb958 (diff) | |
download | perl-36bbe248096ab718da92e52c9927b81877a3d388.tar.gz |
fix places that mean C<"word" character> but say C<alphanumeric
character>
p4raw-id: //depot/perl@6130
Diffstat (limited to 'pod/perlre.pod')
-rw-r--r-- | pod/perlre.pod | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod index 2db4139c30..a82ab32b73 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -169,7 +169,7 @@ You'll need to write something like C<m/\Quser\E\@\Qhost/>. 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<use locale> 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; |