summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2011-11-23 11:42:14 +0100
committerPaolo Bonzini <bonzini@gnu.org>2011-11-23 14:58:14 +0100
commit727d6fa86095b898a6a34e7645aec5624c8c59b3 (patch)
tree74562040189d7a728299a5809a74eafca2a21d96 /doc
parent90b2d540323c2489ee1bfd399a6f7e2b5b89251e (diff)
downloadsed-727d6fa86095b898a6a34e7645aec5624c8c59b3.tar.gz
document that . does not match newline in multi-line mode
2011-11-23 Paolo Bonzini <bonzini@gnu.org> * doc/sed-in.texi: Document how multiline mode affects matching newlines against period. Reported by Dmitry Bolshakov.
Diffstat (limited to 'doc')
-rw-r--r--doc/sed-in.texi36
-rw-r--r--doc/sed.texi36
2 files changed, 48 insertions, 24 deletions
diff --git a/doc/sed-in.texi b/doc/sed-in.texi
index 9f02917..bc7320d 100644
--- a/doc/sed-in.texi
+++ b/doc/sed-in.texi
@@ -532,15 +532,16 @@ a case-insensitive manner.
@item /@var{regexp}/M
@itemx \%@var{regexp}%M
-@ifset PERL
@cindex @value{SSEDEXT}, @code{M} modifier
-@end ifset
+@ifset PERL
@cindex Perl-style regular expressions, multiline
+@end ifset
The @code{M} modifier to regular-expression matching is a @value{SSED}
-extension which causes @code{^} and @code{$} to match respectively
-(in addition to the normal behavior) the empty string after a newline,
-and the empty string before a newline. There are special character
-sequences
+extension which directs @value{SSED} to match the regular expression
+in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
+match respectively (in addition to the normal behavior) the empty string
+after a newline, and the empty string before a newline. There are
+special character sequences
@ifset PERL
(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
in basic or extended regular expression modes)
@@ -549,7 +550,12 @@ in basic or extended regular expression modes)
(@code{\`} and @code{\'})
@end ifclear
which always match the beginning or the end of the buffer.
-@code{M} stands for @cite{multi-line}.
+In addition,
+@ifset PERL
+just like in Perl mode without the @code{S} modifier,
+@end ifset
+the period character does not match a new-line character in
+multi-line mode.
@ifset PERL
@item /@var{regexp}/S
@@ -1128,10 +1134,11 @@ case-insensitive manner.
@cindex Perl-style regular expressions, multiline
@end ifset
The @code{M} modifier to regular-expression matching is a @value{SSED}
-extension which causes @code{^} and @code{$} to match respectively
-(in addition to the normal behavior) the empty string after a newline,
-and the empty string before a newline. There are special character
-sequences
+extension which directs @value{SSED} to match the regular expression
+in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
+match respectively (in addition to the normal behavior) the empty string
+after a newline, and the empty string before a newline. There are
+special character sequences
@ifset PERL
(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
in basic or extended regular expression modes)
@@ -1140,7 +1147,12 @@ in basic or extended regular expression modes)
(@code{\`} and @code{\'})
@end ifclear
which always match the beginning or the end of the buffer.
-@code{M} stands for @cite{multi-line}.
+In addition,
+@ifset PERL
+just like in Perl mode without the @code{S} modifier,
+@end ifset
+the period character does not match a new-line character in
+multi-line mode.
@ifset PERL
@item S
diff --git a/doc/sed.texi b/doc/sed.texi
index 2976148..689113d 100644
--- a/doc/sed.texi
+++ b/doc/sed.texi
@@ -533,15 +533,16 @@ a case-insensitive manner.
@item /@var{regexp}/M
@itemx \%@var{regexp}%M
-@ifset PERL
@cindex @value{SSEDEXT}, @code{M} modifier
-@end ifset
+@ifset PERL
@cindex Perl-style regular expressions, multiline
+@end ifset
The @code{M} modifier to regular-expression matching is a @value{SSED}
-extension which causes @code{^} and @code{$} to match respectively
-(in addition to the normal behavior) the empty string after a newline,
-and the empty string before a newline. There are special character
-sequences
+extension which directs @value{SSED} to match the regular expression
+in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
+match respectively (in addition to the normal behavior) the empty string
+after a newline, and the empty string before a newline. There are
+special character sequences
@ifset PERL
(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
in basic or extended regular expression modes)
@@ -550,7 +551,12 @@ in basic or extended regular expression modes)
(@code{\`} and @code{\'})
@end ifclear
which always match the beginning or the end of the buffer.
-@code{M} stands for @cite{multi-line}.
+In addition,
+@ifset PERL
+just like in Perl mode without the @code{S} modifier,
+@end ifset
+the period character does not match a new-line character in
+multi-line mode.
@ifset PERL
@item /@var{regexp}/S
@@ -1129,10 +1135,11 @@ case-insensitive manner.
@cindex Perl-style regular expressions, multiline
@end ifset
The @code{M} modifier to regular-expression matching is a @value{SSED}
-extension which causes @code{^} and @code{$} to match respectively
-(in addition to the normal behavior) the empty string after a newline,
-and the empty string before a newline. There are special character
-sequences
+extension which directs @value{SSED} to match the regular expression
+in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
+match respectively (in addition to the normal behavior) the empty string
+after a newline, and the empty string before a newline. There are
+special character sequences
@ifset PERL
(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
in basic or extended regular expression modes)
@@ -1141,7 +1148,12 @@ in basic or extended regular expression modes)
(@code{\`} and @code{\'})
@end ifclear
which always match the beginning or the end of the buffer.
-@code{M} stands for @cite{multi-line}.
+In addition,
+@ifset PERL
+just like in Perl mode without the @code{S} modifier,
+@end ifset
+the period character does not match a new-line character in
+multi-line mode.
@ifset PERL
@item S