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

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

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

revision 287 by ph10, Tue Dec 18 20:11:28 2007 UTC revision 428 by ph10, Mon Aug 31 17:10:26 2009 UTC
# Line 49  Output a brief summary these options and Line 49  Output a brief summary these options and
49  Behave as if each regex has the \fB/I\fP modifier; information about the  Behave as if each regex has the \fB/I\fP modifier; information about the
50  compiled pattern is given after compilation.  compiled pattern is given after compilation.
51  .TP 10  .TP 10
52    \fB-M\fP
53    Behave as if each data line contains the \eM escape sequence; this causes
54    PCRE to discover the minimum MATCH_LIMIT and MATCH_LIMIT_RECURSION settings by
55    calling \fBpcre_exec()\fP repeatedly with different limits.
56    .TP 10
57  \fB-m\fP  \fB-m\fP
58  Output the size of each compiled pattern after it has been compiled. This is  Output the size of each compiled pattern after it has been compiled. This is
59  equivalent to adding \fB/M\fP to each regular expression. For compatibility  equivalent to adding \fB/M\fP to each regular expression. For compatibility
# Line 97  that file and writes to stdout. Otherwis Line 102  that file and writes to stdout. Otherwis
102  stdout, and prompts for each line of input, using "re>" to prompt for regular  stdout, and prompts for each line of input, using "re>" to prompt for regular
103  expressions, and "data>" to prompt for data lines.  expressions, and "data>" to prompt for data lines.
104  .P  .P
105  When \fBpcretest\fP is built, a configuration option can specify that it should  When \fBpcretest\fP is built, a configuration option can specify that it should
106  be linked with the \fBlibreadline\fP library. When this is done, if the input  be linked with the \fBlibreadline\fP library. When this is done, if the input
107  is from a terminal, it is read using the \fBreadline()\fP function. This  is from a terminal, it is read using the \fBreadline()\fP function. This
108  provides line-editing and history facilities. The output from the \fB-help\fP  provides line-editing and history facilities. The output from the \fB-help\fP
# Line 171  not correspond to anything in Perl: Line 176  not correspond to anything in Perl:
176    \fB/N\fP              PCRE_NO_AUTO_CAPTURE    \fB/N\fP              PCRE_NO_AUTO_CAPTURE
177    \fB/U\fP              PCRE_UNGREEDY    \fB/U\fP              PCRE_UNGREEDY
178    \fB/X\fP              PCRE_EXTRA    \fB/X\fP              PCRE_EXTRA
179      \fB/<JS>\fP           PCRE_JAVASCRIPT_COMPAT
180    \fB/<cr>\fP           PCRE_NEWLINE_CR    \fB/<cr>\fP           PCRE_NEWLINE_CR
181    \fB/<lf>\fP           PCRE_NEWLINE_LF    \fB/<lf>\fP           PCRE_NEWLINE_LF
182    \fB/<crlf>\fP         PCRE_NEWLINE_CRLF    \fB/<crlf>\fP         PCRE_NEWLINE_CRLF
# Line 355  recognized: Line 361  recognized:
361    \eOdd       set the size of the output vector passed to    \eOdd       set the size of the output vector passed to
362                 \fBpcre_exec()\fP to dd (any number of digits)                 \fBpcre_exec()\fP to dd (any number of digits)
363  .\" JOIN  .\" JOIN
364    \eP         pass the PCRE_PARTIAL option to \fBpcre_exec()\fP    \eP         pass the PCRE_PARTIAL_SOFT option to \fBpcre_exec()\fP
365                 or \fBpcre_dfa_exec()\fP                 or \fBpcre_dfa_exec()\fP; if used twice, pass the
366                   PCRE_PARTIAL_HARD option
367  .\" JOIN  .\" JOIN
368    \eQdd       set the PCRE_MATCH_LIMIT_RECURSION limit to dd    \eQdd       set the PCRE_MATCH_LIMIT_RECURSION limit to dd
369                 (any number of digits)                 (any number of digits)
# Line 454  This section describes the output when t Line 461  This section describes the output when t
461  .P  .P
462  When a match succeeds, pcretest outputs the list of captured substrings that  When a match succeeds, pcretest outputs the list of captured substrings that
463  \fBpcre_exec()\fP returns, starting with number 0 for the string that matched  \fBpcre_exec()\fP returns, starting with number 0 for the string that matched
464  the whole pattern. Otherwise, it outputs "No match" or "Partial match"  the whole pattern. Otherwise, it outputs "No match" or "Partial match:"
465  when \fBpcre_exec()\fP returns PCRE_ERROR_NOMATCH or PCRE_ERROR_PARTIAL,  followed by the partially matching substring when \fBpcre_exec()\fP returns
466  respectively, and otherwise the PCRE negative error number. Here is an example  PCRE_ERROR_NOMATCH or PCRE_ERROR_PARTIAL, respectively, and otherwise the PCRE
467  of an interactive \fBpcretest\fP run.  negative error number. Here is an example of an interactive \fBpcretest\fP run.
468  .sp  .sp
469    $ pcretest    $ pcretest
470    PCRE version 7.0 30-Nov-2006    PCRE version 7.0 30-Nov-2006
# Line 538  the subject where there is at least one Line 545  the subject where there is at least one
545     2: tan     2: tan
546  .sp  .sp
547  (Using the normal matching function on this data finds only "tang".) The  (Using the normal matching function on this data finds only "tang".) The
548  longest matching string is always given first (and numbered zero).  longest matching string is always given first (and numbered zero). After a
549    PCRE_ERROR_PARTIAL return, the output is "Partial match:", followed by the
550    partially matching substring.
551  .P  .P
552  If \fB/g\fP is present on the pattern, the search for further matches resumes  If \fB/g\fP is present on the pattern, the search for further matches resumes
553  at the end of the longest match. For example:  at the end of the longest match. For example:
# Line 717  Cambridge CB2 3QH, England. Line 726  Cambridge CB2 3QH, England.
726  .rs  .rs
727  .sp  .sp
728  .nf  .nf
729  Last updated: 18 December 2007  Last updated: 29 August 2009
730  Copyright (c) 1997-2007 University of Cambridge.  Copyright (c) 1997-2009 University of Cambridge.
731  .fi  .fi

Legend:
Removed from v.287  
changed lines
  Added in v.428

  ViewVC Help
Powered by ViewVC 1.1.5