doc: rework BRE/ERE table to fit PDF manual
Sample code in the basic/extended table was too wide to fit on a Letter size printout. Text was overlapping and unreadable. Remove margin, split commands in two lines and change the column with. * doc/sed.texi (Basic and extended regexp): Rework table.
This commit is contained in:
1 parent
5fbc15c812
commit
45aae495cb
1 file changed
+29
-5
+29
-5
@@ -2460,7 +2460,7 @@ unless prefixed backslash (@samp{\}); While with extended (ERE) syntax
|
||||
it is reversed: these characters are special unless they are prefixed
|
||||
with backslash (@samp{\}).
|
||||
|
||||
@multitable @columnfractions .33 .33 .33
|
||||
@multitable @columnfractions .28 .36 .35
|
||||
|
||||
@headitem Desired pattern
|
||||
@tab Basic (BRE) Syntax
|
||||
@@ -2469,32 +2469,56 @@ with backslash (@samp{\}).
|
||||
@item literal @samp{+} (plus sign)
|
||||
|
||||
@tab
|
||||
@exampleindent 0
|
||||
@codequoteundirected on
|
||||
@codequotebacktick on
|
||||
@example
|
||||
$ echo "a+b=c" | sed -n '/a+b/p'
|
||||
$ echo 'a+b=c' > foo
|
||||
$ sed -n '/a+b/p' foo
|
||||
a+b=c
|
||||
@end example
|
||||
@codequotebacktick off
|
||||
@codequoteundirected off
|
||||
|
||||
@tab
|
||||
@exampleindent 0
|
||||
@codequoteundirected on
|
||||
@codequotebacktick on
|
||||
@example
|
||||
$ echo "a+b=c" | sed -E -n '/a\+b/p'
|
||||
$ echo 'a+b=c' > foo
|
||||
$ sed -E -n '/a\+b/p' foo
|
||||
a+b=c
|
||||
@end example
|
||||
@codequotebacktick off
|
||||
@codequoteundirected off
|
||||
|
||||
|
||||
@item One or more @samp{a} characters followed by @samp{b}
|
||||
(plus sign as special meta-character)
|
||||
|
||||
@tab
|
||||
@exampleindent 0
|
||||
@codequoteundirected on
|
||||
@codequotebacktick on
|
||||
@example
|
||||
$ echo "aab" | sed -n '/a\+b/p'
|
||||
$ echo aab > foo
|
||||
$ sed -n '/a\+b/p' foo
|
||||
aab
|
||||
@end example
|
||||
@codequotebacktick off
|
||||
@codequoteundirected off
|
||||
|
||||
@tab
|
||||
@exampleindent 0
|
||||
@codequoteundirected on
|
||||
@codequotebacktick on
|
||||
@example
|
||||
$ echo "aab" | sed -E -n '/a+b/p'
|
||||
$ echo aab > foo
|
||||
$ sed -E -n '/a+b/p' foo
|
||||
aab
|
||||
@end example
|
||||
@codequotebacktick off
|
||||
@codequoteundirected off
|
||||
|
||||
@end multitable
|
||||
|
||||
|
||||
Reference in new issue
Block a user