summaryrefslogtreecommitdiff
path: root/pod/perlre.pod
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-09-20 15:08:33 +0100
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-09-20 15:08:33 +0100
commit0f36ee90980e6a3d72130080445d39d089f72222 (patch)
tree53f4b55addf4bdf0ff6c5c5f1bf3f0983c3dd4fb /pod/perlre.pod
parent6ee5d4e753701f045990e0dff3f5b0fbd3fa9751 (diff)
downloadperl-0f36ee90980e6a3d72130080445d39d089f72222.tar.gz
perl 5.003_06: pod/perlre.pod
Date: Wed, 11 Sep 1996 11:55:18 -0500 From: "Daniel S. Lewart" <lewart@vadds.cvm.uiuc.edu> Subject: POD spelling patches Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST) From: "Joseph S. Myers" <jsm28@hermes.cam.ac.uk> Subject: Pod typos, pod2man bugs, and miscellaneous installation comments Here is a patch for various typos and other defects in the Perl 5.003_05 pods, including the pods embedded in library modules. Date: Fri, 4 Oct 1996 10:36:19 -0400 (EDT) From: Kenneth Albanowski <kjahds@kjahds.com> Subject: Re: Suggestion for improving man page Add alternative names for various escape sequences.
Diffstat (limited to 'pod/perlre.pod')
-rw-r--r--pod/perlre.pod28
1 files changed, 14 insertions, 14 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod
index 6d21a65f31..55dc1209bc 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -100,12 +100,12 @@ Note that the meanings don't change, just the "gravity":
Since patterns are processed as double quoted strings, the following
also work:
- \t tab
- \n newline
- \r return
- \f form feed
- \a alarm (bell)
- \e escape (think troff)
+ \t tab (HT, TAB)
+ \n newline (LF, NL)
+ \r return (CR)
+ \f form feed (FF)
+ \a alarm (bell) (BEL)
+ \e escape (think troff) (ESC)
\033 octal char (think of a PDP-11)
\x1B hex char
\c[ control char
@@ -148,11 +148,11 @@ C</m> modifier is used, while "^" and "$" will match at every internal line
boundary. To match the actual end of the string, not ignoring newline,
you can use C<\Z(?!\n)>.
-When the bracketing construct C<( ... )> is used, \<digit> matches the
+When the bracketing construct C<( ... )> is used, \E<lt>digitE<gt> matches the
digit'th substring. Outside of the pattern, always use "$" instead of "\"
-in front of the digit. (While the \<digit> notation can on rare occasion work
+in front of the digit. (While the \E<lt>digitE<gt> notation can on rare occasion work
outside the current pattern, this should not be relied upon. See the
-WARNING below.) The scope of $<digit> (and C<$`>, C<$&>, and C<$'>)
+WARNING below.) The scope of $E<lt>digitE<gt> (and C<$`>, C<$&>, and C<$'>)
extends to the end of the enclosing BLOCK or eval string, or to the next
successful pattern match, whichever comes first. If you want to use
parentheses to delimit a subpattern (e.g. a set of alternatives) without
@@ -167,7 +167,7 @@ same as \010, a backspace, and \11 the same as \011, a tab. And so
on. (\1 through \9 are always backreferences.)
C<$+> returns whatever the last bracket match matched. C<$&> returns the
-entire matched string. ($0 used to return the same thing, but not any
+entire matched string. (C<$0> used to return the same thing, but not any
more.) C<$`> returns everything before the matched string. C<$'> returns
everything after the matched string. Examples:
@@ -182,7 +182,7 @@ everything after the matched string. Examples:
You will note that all backslashed metacharacters in Perl are
alphanumeric, such as C<\b>, C<\w>, C<\n>. Unlike some other regular expression
languages, there are no backslashed symbols that aren't alphanumeric.
-So anything that looks like \\, \(, \), \<, \>, \{, or \} is always
+So anything that looks like \\, \(, \), \E<lt>, \E<gt>, \{, or \} is always
interpreted as a literal character, not a metacharacter. This makes it
simple to quote a string that you want to use for a pattern but that
you are afraid might contain metacharacters. Simply quote all the
@@ -211,7 +211,7 @@ whitespace formatting, a simple C<#> will suffice.
=item (?:regexp)
-This groups things like "()" but doesn't make backrefences like "()" does. So
+This groups things like "()" but doesn't make backreferences like "()" does. So
split(/\b(?:a|b|c)\b/)
@@ -235,7 +235,7 @@ use this for lookbehind: C</(?!foo)bar/> will not find an occurrence of
"bar" that is preceded by something which is not "foo". That's because
the C<(?!foo)> is just saying that the next thing cannot be "foo"--and
it's not, it's a "bar", so "foobar" will match. You would have to do
-something like C</(?foo)...bar/> for that. We say "like" because there's
+something like C</(?!foo)...bar/> for that. We say "like" because there's
the case of your "bar" not having three characters before it. You could
cover that this way: C</(?:(?!foo)...|^..?)bar/>. Sometimes it's still
easier just to say:
@@ -476,7 +476,7 @@ Characters may be specified using a metacharacter syntax much like that
used in C: "\n" matches a newline, "\t" a tab, "\r" a carriage return,
"\f" a form feed, etc. More generally, \I<nnn>, where I<nnn> is a string
of octal digits, matches the character whose ASCII value is I<nnn>.
-Similarly, \xI<nn>, where I<nn> are hexidecimal digits, matches the
+Similarly, \xI<nn>, where I<nn> are hexadecimal digits, matches the
character whose ASCII value is I<nn>. The expression \cI<x> matches the
ASCII character control-I<x>. Finally, the "." metacharacter matches any
character except "\n" (unless you use C</s>).