diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2011-11-23 11:42:14 +0100 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2011-11-23 14:58:14 +0100 |
commit | 727d6fa86095b898a6a34e7645aec5624c8c59b3 (patch) | |
tree | 74562040189d7a728299a5809a74eafca2a21d96 /doc/sed-in.texi | |
parent | 90b2d540323c2489ee1bfd399a6f7e2b5b89251e (diff) | |
download | sed-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/sed-in.texi')
-rw-r--r-- | doc/sed-in.texi | 36 |
1 files changed, 24 insertions, 12 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 |