@@ -68,6 +68,9 @@ The block of memory that is actually used is three times the "buffer size", to
68
68
allow for buffering "before" and "after" lines. If the buffer size is too
69
69
small, fewer than requested "before" and "after" lines may be output.
70
70
.P
71
+ When matching with a multiline pattern, the size of the buffer must be at least
72
+ half of the maximum match expected or the pattern might fail to match.
73
+ .P
71
74
Patterns can be no longer than 8KiB or BUFSIZ bytes, whichever is the greater.
72
75
BUFSIZ is defined in \fB <stdio.h> \fP . When there is more than one pattern
73
76
(specified by the use of \fB -e \fP and/or \fB -f \fP ), each pattern is applied to
@@ -211,7 +214,7 @@ exactly the same as the number of lines that would have been output, but if the
211
214
\fB -M \fP (multiline) option is used (without \fB -v \fP ), there may be more
212
215
suppressed lines than the count (that is, the number of matches).
213
216
.sp
214
- If no lines are selected, the number zero is output. If several files are are
217
+ If no lines are selected, the number zero is output. If several files are
215
218
being scanned, a count is output for each of them and the \fB -t \fP option can
216
219
be used to cause a total to be output at the end. However, if the
217
220
\fB --files-with-matches \fP option is also used, only those files whose counts
@@ -506,8 +509,10 @@ well as possibly handling a two-character newline sequence.
506
509
.sp
507
510
There is a limit to the number of lines that can be matched, imposed by the way
508
511
that \fB pcre2grep \fP buffers the input file as it scans it. With a sufficiently
509
- large processing buffer, this should not be a problem, but the \fB -M \fP option
510
- does not work when input is read line by line (see \fB --line-buffered \fP .)
512
+ large processing buffer, this should not be a problem.
513
+ .sp
514
+ The \fB -M \fP option does not work when input is read line by line (see
515
+ \fB --line-buffered \fP .)
511
516
.TP
512
517
\fB -m \fP \fI number \fP , \fB --max-count \fP =\fI number \fP
513
518
Stop processing after finding \fI number \fP matching lines, or non-matching
0 commit comments