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:28 +0100 |
commit | 9c7c770820d6991b0d88eca34e71baab36522746 (patch) | |
tree | 41f12c1a3297cda4b5ab48824d488f54a49f1aba | |
parent | b2a79b1be70dce681cf997fa3e9cb19fe346e925 (diff) | |
download | sed-9c7c770820d6991b0d88eca34e71baab36522746.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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/sed-in.texi | 36 | ||||
-rw-r--r-- | doc/sed.texi | 36 |
3 files changed, 53 insertions, 24 deletions
@@ -1,3 +1,8 @@ +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. + 2011-08-29 Paolo Bonzini <bonzini@gnu.org> * sed/sed.c (usage): Fix documentation for -i. Reported by 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 diff --git a/doc/sed.texi b/doc/sed.texi index 6f22872..ff2a559 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 |