/[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 653 by ph10, Mon Aug 1 10:22:59 2011 UTC revision 654 by ph10, Tue Aug 2 11:00:40 2011 UTC
# Line 18  options, see the Line 18  options, see the
18  .\" HREF  .\" HREF
19  \fBpcreapi\fP  \fBpcreapi\fP
20  .\"  .\"
21  documentation. The input for \fBpcretest\fP is a sequence of regular expression  documentation. The input for \fBpcretest\fP is a sequence of regular expression
22  patterns and strings to be matched, as described below. The output shows the  patterns and strings to be matched, as described below. The output shows the
23  result of each match. Options on the command line and the patterns control PCRE  result of each match. Options on the command line and the patterns control PCRE
24  options and exactly what is output.  options and exactly what is output.
25  .  .
26  .  .
# Line 257  The \fB/+\fP modifier requests that as w Line 257  The \fB/+\fP modifier requests that as w
257  matched the entire pattern, \fBpcretest\fP should in addition output the  matched the entire pattern, \fBpcretest\fP should in addition output the
258  remainder of the subject string. This is useful for tests where the subject  remainder of the subject string. This is useful for tests where the subject
259  contains multiple copies of the same substring. If the \fB+\fP modifier appears  contains multiple copies of the same substring. If the \fB+\fP modifier appears
260  twice, the same action is taken for captured substrings. In each case the  twice, the same action is taken for captured substrings. In each case the
261  remainder is output on the following line with a plus character following the  remainder is output on the following line with a plus character following the
262  capture number.  capture number.
263  .P  .P
264  The \fB/=\fP modifier requests that the values of all potential captured  The \fB/=\fP modifier requests that the values of all potential captured
265  parentheses be output after a match by \fBpcre_exec()\fP. By default, only  parentheses be output after a match by \fBpcre_exec()\fP. By default, only
266  those up to the highest one actually used in the match are output  those up to the highest one actually used in the match are output
267  (corresponding to the return code from \fBpcre_exec()\fP). Values in the  (corresponding to the return code from \fBpcre_exec()\fP). Values in the
268  offsets vector corresponding to higher numbers should be set to -1, and these  offsets vector corresponding to higher numbers should be set to -1, and these
269  are output as "<unset>". This modifier gives a way of checking that this is  are output as "<unset>". This modifier gives a way of checking that this is
270  happening.  happening.
271  .P  .P
# Line 319  pattern to be output. Line 319  pattern to be output.
319  .P  .P
320  If the \fB/S\fP modifier appears once, it causes \fBpcre_study()\fP to be  If the \fB/S\fP modifier appears once, it causes \fBpcre_study()\fP to be
321  called after the expression has been compiled, and the results used when the  called after the expression has been compiled, and the results used when the
322  expression is matched. If \fB/S\fP appears twice, it suppresses studying, even  expression is matched. If \fB/S\fP appears twice, it suppresses studying, even
323  if it was requested externally by the \fB-s\fP command line option. This makes  if it was requested externally by the \fB-s\fP command line option. This makes
324  it possible to specify that certain patterns are always studied, and others are  it possible to specify that certain patterns are always studied, and others are
325  never studied, independently of \fB-s\fP. This feature is used in the test  never studied, independently of \fB-s\fP. This feature is used in the test
326  files in a few cases where the output is different when the pattern is studied.  files in a few cases where the output is different when the pattern is studied.
327  .P  .P
328  The \fB/T\fP modifier must be followed by a single digit. It causes a specific  The \fB/T\fP modifier must be followed by a single digit. It causes a specific
# Line 551  include characters before the actual mat Line 551  include characters before the actual mat
551  \eK, \eb, or \eB was involved.) For any other return, \fBpcretest\fP outputs  \eK, \eb, or \eB was involved.) For any other return, \fBpcretest\fP outputs
552  the PCRE negative error number and a short descriptive phrase. If the error is  the PCRE negative error number and a short descriptive phrase. If the error is
553  a failed UTF-8 string check, the byte offset of the start of the failing  a failed UTF-8 string check, the byte offset of the start of the failing
554  character and the reason code are also output, provided that the size of the  character and the reason code are also output, provided that the size of the
555  output vector is at least two. Here is an example of an interactive  output vector is at least two. Here is an example of an interactive
556  \fBpcretest\fP run.  \fBpcretest\fP run.
557  .sp  .sp
# Line 603  matching attempts are output in sequence Line 603  matching attempts are output in sequence
603     0: ipp     0: ipp
604     1: pp     1: pp
605  .sp  .sp
606  "No match" is output only if the first match attempt fails. Here is an example  "No match" is output only if the first match attempt fails. Here is an example
607  of a failure message (the offset 4 that is specified by \e>4 is past the end of  of a failure message (the offset 4 that is specified by \e>4 is past the end of
608  the subject string):  the subject string):
609  .sp  .sp
610      re> /xyz/      re> /xyz/
611    data> xyz\>4    data> xyz\e>4
612    Error -24 (bad offset value)    Error -24 (bad offset value)
613  .P  .P
614  If any of the sequences \fB\eC\fP, \fB\eG\fP, or \fB\eL\fP are present in a  If any of the sequences \fB\eC\fP, \fB\eG\fP, or \fB\eL\fP are present in a
615  data line that is successfully matched, the substrings extracted by the  data line that is successfully matched, the substrings extracted by the
# Line 725  a change of latest mark is passed to the Line 725  a change of latest mark is passed to the
725    +10 ^^      b    +10 ^^      b
726    Latest Mark: X    Latest Mark: X
727    +11 ^ ^     c    +11 ^ ^     c
728    +12 ^  ^    +12 ^  ^
729     0: abc     0: abc
730  .sp  .sp
731  The mark changes between matching "a" and "b", but stays the same for the rest  The mark changes between matching "a" and "b", but stays the same for the rest

Legend:
Removed from v.653  
changed lines
  Added in v.654

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12