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

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

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

revision 378 by ph10, Sun Mar 1 14:13:34 2009 UTC revision 379 by ph10, Mon Mar 2 20:30:05 2009 UTC
# Line 25  If you attempt to use delimiters (for ex Line 25  If you attempt to use delimiters (for ex
25  slashes, as is common in Perl scripts), they are interpreted as part of the  slashes, as is common in Perl scripts), they are interpreted as part of the
26  pattern. Quotes can of course be used to delimit patterns on the command line  pattern. Quotes can of course be used to delimit patterns on the command line
27  because they are interpreted by the shell, and indeed they are required if a  because they are interpreted by the shell, and indeed they are required if a
28  pattern contains white space or shell metacharacters.  pattern contains white space or shell metacharacters.
29  .P  .P
30  The first argument that follows any option settings is treated as the single  The first argument that follows any option settings is treated as the single
31  pattern to be matched when neither \fB-e\fP nor \fB-f\fP is present.  pattern to be matched when neither \fB-e\fP nor \fB-f\fP is present.
# Line 50  Patterns are limited to 8K or BUFSIZ cha Line 50  Patterns are limited to 8K or BUFSIZ cha
50  BUFSIZ is defined in \fB<stdio.h>\fP. When there is more than one pattern  BUFSIZ is defined in \fB<stdio.h>\fP. When there is more than one pattern
51  (specified by the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to  (specified by the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to
52  each line in the order in which they are defined, except that all the \fB-e\fP  each line in the order in which they are defined, except that all the \fB-e\fP
53  patterns are tried before the \fB-f\fP patterns. As soon as one pattern matches  patterns are tried before the \fB-f\fP patterns.
 (or fails to match when \fB-v\fP is used), no further patterns are considered.  
54  .P  .P
55  When \fB--only-matching\fP, \fB--file-offsets\fP, or \fB--line-offsets\fP  By default, as soon as one pattern matches (or fails to match when \fB-v\fP is
56  is used, the output is the part of the line that matched (either shown  used), no further patterns are considered. However, if \fB--colour\fP (or
57  literally, or as an offset). In this case, scanning resumes immediately  \fB--color\fP) is used to colour the matching substrings, or if
58  following the match, so that further matches on the same line can be found.  \fB--only-matching\fP, \fB--file-offsets\fP, or \fB--line-offsets\fP is used to
59  If there are multiple patterns, they are all tried on the remainder of the  output only the part of the line that matched (either shown literally, or as an
60  line. However, patterns that follow the one that matched are not tried on the  offset), scanning resumes immediately following the match, so that further
61  earlier part of the line.  matches on the same line can be found. If there are multiple patterns, they are
62    all tried on the remainder of the line, but patterns that follow the one that
63    matched are not tried on the earlier part of the line.
64    .P
65    This is the same behaviour as GNU grep, but it does mean that the order in
66    which multiple patterns are specified can affect the output when one of the
67    above options is used.
68    .P
69    Patterns that can match an empty string are accepted, but empty string
70    matches are not recognized. An example is the pattern "(super)?(man)?", in
71    which all components are optional. This pattern finds all occurrences of both
72    "super" and "man"; the output differs from matching with "super|man" when only
73    the matching substrings are being shown.
74  .P  .P
75  If the \fBLC_ALL\fP or \fBLC_CTYPE\fP environment variable is set,  If the \fBLC_ALL\fP or \fBLC_CTYPE\fP environment variable is set,
76  \fBpcregrep\fP uses the value to set a locale when calling the PCRE library.  \fBpcregrep\fP uses the value to set a locale when calling the PCRE library.

Legend:
Removed from v.378  
changed lines
  Added in v.379

  ViewVC Help
Powered by ViewVC 1.1.5