/[pcre]/code/trunk/doc/html/pcregrep.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcregrep.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 572 by ph10, Wed Nov 17 17:55:57 2010 UTC revision 579 by ph10, Wed Nov 24 17:39:25 2010 UTC
# Line 366  locale is specified, the PCRE library's Line 366  locale is specified, the PCRE library's
366  used. There is no short form for this option.  used. There is no short form for this option.
367  </P>  </P>
368  <P>  <P>
369  <b>--match-limit</b>=<i>number</i>  <b>--match-limit</b>=<i>number</i>
370  Processing some regular expression patterns can require a very large amount of  Processing some regular expression patterns can require a very large amount of
371  memory, leading in some cases to a program crash if not enough is available.  memory, leading in some cases to a program crash if not enough is available.
372  Other patterns may take a very long time to search for all possible matching  Other patterns may take a very long time to search for all possible matching
373  strings. The <b>pcre_exec()</b> function that is called by <b>pcregrep</b> to do  strings. The <b>pcre_exec()</b> function that is called by <b>pcregrep</b> to do
374  the matching has two parameters that can limit the resources that it uses.  the matching has two parameters that can limit the resources that it uses.
375  <br>  <br>
376  <br>  <br>
377  The <b>--match-limit</b> option provides a means of limiting resource usage  The <b>--match-limit</b> option provides a means of limiting resource usage
# Line 392  of calls, because not all calls to <b>ma Line 392  of calls, because not all calls to <b>ma
392  of use only if it is set smaller than <b>--match-limit</b>.  of use only if it is set smaller than <b>--match-limit</b>.
393  <br>  <br>
394  <br>  <br>
395  There are no short forms for these options. The default settings are specified  There are no short forms for these options. The default settings are specified
396  when the PCRE library is compiled, with the default default being 10 million.  when the PCRE library is compiled, with the default default being 10 million.
397  </P>  </P>
398  <P>  <P>
# Line 451  exclusive with <b>--file-offsets</b> and Line 451  exclusive with <b>--file-offsets</b> and
451  </P>  </P>
452  <P>  <P>
453  <b>-o</b><i>number</i>, <b>--only-matching</b>=<i>number</i>  <b>-o</b><i>number</i>, <b>--only-matching</b>=<i>number</i>
454  Show only the part of the line that matched the capturing parentheses of the  Show only the part of the line that matched the capturing parentheses of the
455  given number. Up to 32 capturing parentheses are supported. Because these  given number. Up to 32 capturing parentheses are supported. Because these
456  options can be given without an argument (see above), if an argument is  options can be given without an argument (see above), if an argument is
457  present, it must be given in the same shell item, for example, -o3 or  present, it must be given in the same shell item, for example, -o3 or
458  --only-matching=2. The comments given for the non-argument case above also  --only-matching=2. The comments given for the non-argument case above also
459  apply to this case. If the specified capturing parentheses do not exist in the  apply to this case. If the specified capturing parentheses do not exist in the
460  pattern, or were not set in the match, nothing is output unless the file name  pattern, or were not set in the match, nothing is output unless the file name
461  or line number are being printed.  or line number are being printed.
462  </P>  </P>
463  <P>  <P>
# Line 554  exception) in the next command line item Line 554  exception) in the next command line item
554    -f/some/file    -f/some/file
555    -f /some/file    -f /some/file
556  </pre>  </pre>
557  The exception is the <b>-o</b> option, which may appear with or without data.  The exception is the <b>-o</b> option, which may appear with or without data.
558  Because of this, if data is present, it must follow immediately in the same  Because of this, if data is present, it must follow immediately in the same
559  item, for example -o3.  item, for example -o3.
560  </P>  </P>
561  <P>  <P>
# Line 575  specially unless it is at the start of a Line 575  specially unless it is at the start of a
575  The exceptions to the above are the <b>--colour</b> (or <b>--color</b>) and  The exceptions to the above are the <b>--colour</b> (or <b>--color</b>) and
576  <b>--only-matching</b> options, for which the data is optional. If one of these  <b>--only-matching</b> options, for which the data is optional. If one of these
577  options does have data, it must be given in the first form, using an equals  options does have data, it must be given in the first form, using an equals
578  character. Otherwise \fBpcregrep\P will assume that it has no data.  character. Otherwise <b>pcregrep</b> will assume that it has no data.
579  </P>  </P>
580  <br><a name="SEC9" href="#TOC1">MATCHING ERRORS</a><br>  <br><a name="SEC9" href="#TOC1">MATCHING ERRORS</a><br>
581  <P>  <P>
# Line 590  there are more than 20 such errors, <b>p Line 590  there are more than 20 such errors, <b>p
590  <P>  <P>
591  The <b>--match-limit</b> option of <b>pcregrep</b> can be used to set the overall  The <b>--match-limit</b> option of <b>pcregrep</b> can be used to set the overall
592  resource limit; there is a second option called <b>--recursion-limit</b> that  resource limit; there is a second option called <b>--recursion-limit</b> that
593  sets a limit on the amount of memory (usually stack) that is used (see the  sets a limit on the amount of memory (usually stack) that is used (see the
594  discussion of these options above).  discussion of these options above).
595  </P>  </P>
596  <br><a name="SEC10" href="#TOC1">DIAGNOSTICS</a><br>  <br><a name="SEC10" href="#TOC1">DIAGNOSTICS</a><br>

Legend:
Removed from v.572  
changed lines
  Added in v.579

  ViewVC Help
Powered by ViewVC 1.1.5