summaryrefslogtreecommitdiff
path: root/doc/sed-in.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/sed-in.texi')
-rw-r--r--doc/sed-in.texi36
1 files changed, 24 insertions, 12 deletions
diff --git a/doc/sed-in.texi b/doc/sed-in.texi
index f058f03..1c28d66 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