/[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 902 by ph10, Sat Jan 14 16:45:24 2012 UTC revision 903 by ph10, Sat Jan 21 16:37:17 2012 UTC
# Line 31  options and exactly what is output. Line 31  options and exactly what is output.
31  .SH "PCRE's 8-BIT and 16-BIT LIBRARIES"  .SH "PCRE's 8-BIT and 16-BIT LIBRARIES"
32  .rs  .rs
33  .sp  .sp
34  From release 8.30, two separate PCRE libraries can be built. The original one  From release 8.30, two separate PCRE libraries can be built. The original one
35  supports 8-bit character strings, whereas the newer 16-bit library supports  supports 8-bit character strings, whereas the newer 16-bit library supports
36  character strings encoded in 16-bit units. The \fBpcretest\fP program can be  character strings encoded in 16-bit units. The \fBpcretest\fP program can be
37  used to test both libraries. However, it is itself still an 8-bit program,  used to test both libraries. However, it is itself still an 8-bit program,
38  reading 8-bit input and writing 8-bit output. When testing the 16-bit library,  reading 8-bit input and writing 8-bit output. When testing the 16-bit library,
39  the patterns and data strings are converted to 16-bit format before being  the patterns and data strings are converted to 16-bit format before being
40  passed to the PCRE library functions. Results are converted to 8-bit for  passed to the PCRE library functions. Results are converted to 8-bit for
41  output.  output.
42  .P  .P
43  References to functions and structures of the form \fBpcre[16]_xx\fP below  References to functions and structures of the form \fBpcre[16]_xx\fP below
44  mean "\fBpcre_xx\fP when using the 8-bit library or \fBpcre16_xx\fP when using  mean "\fBpcre_xx\fP when using the 8-bit library or \fBpcre16_xx\fP when using
45  the 16-bit library".  the 16-bit library".
46  .  .
47  .  .
# Line 49  the 16-bit library". Line 49  the 16-bit library".
49  .rs  .rs
50  .TP 10  .TP 10
51  \fB-16\fP  \fB-16\fP
52  If both the 8-bit and the 16-bit libraries have been built, this option causes  If both the 8-bit and the 16-bit libraries have been built, this option causes
53  the 16-bit library to be used. If only the 16-bit library has been built, this  the 16-bit library to be used. If only the 16-bit library has been built, this
54  is the default (so has no effect). If only the 8-bit library has been built,  is the default (so has no effect). If only the 8-bit library has been built,
55  this option causes an error.  this option causes an error.
56  .TP 10  .TP 10
57  \fB-b\fP  \fB-b\fP
# Line 60  internal form is output after compilatio Line 60  internal form is output after compilatio
60  .TP 10  .TP 10
61  \fB-C\fP  \fB-C\fP
62  Output the version number of the PCRE library, and all available information  Output the version number of the PCRE library, and all available information
63  about the optional features that are included, and then exit. All other options  about the optional features that are included, and then exit. All other options
64  are ignored.  are ignored.
65  .TP 10  .TP 10
66  \fB-C\fP \fIoption\fP  \fB-C\fP \fIoption\fP
67  Output information about a specific build-time option, then exit. This  Output information about a specific build-time option, then exit. This
68  functionality is intended for use in scripts such as \fBRunTest\fP. The  functionality is intended for use in scripts such as \fBRunTest\fP. The
69  following options output the value indicated:  following options output the value indicated:
70  .sp  .sp
71    linksize   the internal link size (2, 3, or 4)    linksize   the internal link size (2, 3, or 4)
72    newline    the default newline setting:    newline    the default newline setting:
73                 CR, LF, CRLF, ANYCRLF, or ANY                 CR, LF, CRLF, ANYCRLF, or ANY
74  .sp  .sp
75  The following options output 1 for true or zero for false:  The following options output 1 for true or zero for false:
76  .sp  .sp
77    jit        just-in-time support is available    jit        just-in-time support is available
78    pcre16     the 16-bit library was built    pcre16     the 16-bit library was built
79    pcre8      the 8-bit library was built    pcre8      the 8-bit library was built
80    ucp        Unicode property support is available    ucp        Unicode property support is available
81    utf        UTF-8 and/or UTF-16 support is available    utf        UTF-8 and/or UTF-16 support is available
82  .TP 10  .TP 10
83  \fB-d\fP  \fB-d\fP
# Line 104  calling \fBpcre[16]_exec()\fP repeatedly Line 104  calling \fBpcre[16]_exec()\fP repeatedly
104  .TP 10  .TP 10
105  \fB-m\fP  \fB-m\fP
106  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
107  equivalent to adding \fB/M\fP to each regular expression. The size is given in  equivalent to adding \fB/M\fP to each regular expression. The size is given in
108  bytes for both libraries.  bytes for both libraries.
109  .TP 10  .TP 10
110  \fB-o\fP \fIosize\fP  \fB-o\fP \fIosize\fP
# Line 137  result of studying is not included when Line 137  result of studying is not included when
137  neither \fB-i\fP nor \fB-d\fP is present on the command line. This behaviour  neither \fB-i\fP nor \fB-d\fP is present on the command line. This behaviour
138  means that the output from tests that are run with and without \fB-s\fP should  means that the output from tests that are run with and without \fB-s\fP should
139  be identical, except when options that output information about the actual  be identical, except when options that output information about the actual
140  running of a match are set.  running of a match are set.
141  .sp  .sp
142  The \fB-M\fP, \fB-t\fP, and \fB-tm\fP options, which give information about  The \fB-M\fP, \fB-t\fP, and \fB-tm\fP options, which give information about
143  resources used, are likely to produce different output with and without  resources used, are likely to produce different output with and without
# Line 237  effect as they do in Perl. For example: Line 237  effect as they do in Perl. For example:
237  The following table shows additional modifiers for setting PCRE compile-time  The following table shows additional modifiers for setting PCRE compile-time
238  options that do not correspond to anything in Perl:  options that do not correspond to anything in Perl:
239  .sp  .sp
240    \fB/8\fP              PCRE_UTF8           ) when using the 8-bit    \fB/8\fP              PCRE_UTF8           ) when using the 8-bit
241    \fB/?\fP              PCRE_NO_UTF8_CHECK  )   library    \fB/?\fP              PCRE_NO_UTF8_CHECK  )   library
242  .sp  .sp
243    \fB/8\fP              PCRE_UTF16          ) when using the 16-bit    \fB/8\fP              PCRE_UTF16          ) when using the 16-bit
244    \fB/?\fP              PCRE_NO_UTF16_CHECK )   library    \fB/?\fP              PCRE_NO_UTF16_CHECK )   library
245  .sp  .sp
246    \fB/A\fP              PCRE_ANCHORED    \fB/A\fP              PCRE_ANCHORED
247    \fB/C\fP              PCRE_AUTO_CALLOUT    \fB/C\fP              PCRE_AUTO_CALLOUT
248    \fB/E\fP              PCRE_DOLLAR_ENDONLY    \fB/E\fP              PCRE_DOLLAR_ENDONLY
# Line 270  This example sets multiline matching wit Line 270  This example sets multiline matching wit
270  .sp  .sp
271  As well as turning on the PCRE_UTF8/16 option, the \fB/8\fP modifier causes  As well as turning on the PCRE_UTF8/16 option, the \fB/8\fP modifier causes
272  all non-printing characters in output strings to be printed using the  all non-printing characters in output strings to be printed using the
273  \ex{hh...} notation. Otherwise, those less than 0x100 are output in hex without  \ex{hh...} notation. Otherwise, those less than 0x100 are output in hex without
274  the curly brackets.  the curly brackets.
275  .P  .P
276  Full details of the PCRE options are given in the  Full details of the PCRE options are given in the
# Line 663  substring is shown as "<unset>", as for Line 663  substring is shown as "<unset>", as for
663     2: b     2: b
664  .sp  .sp
665  If the strings contain any non-printing characters, they are output as \exhh  If the strings contain any non-printing characters, they are output as \exhh
666  escapes if the value is less than 256 and UTF mode is not set. Otherwise they  escapes if the value is less than 256 and UTF mode is not set. Otherwise they
667  are output as \ex{hh...} escapes. See below for the definition of non-printing  are output as \ex{hh...} escapes. See below for the definition of non-printing
668  characters. If the pattern has the \fB/+\fP modifier, the output for substring  characters. If the pattern has the \fB/+\fP modifier, the output for substring
669  0 is followed by the the rest of the subject string, identified by "0+" like  0 is followed by the the rest of the subject string, identified by "0+" like
# Line 890  been loaded, \fBpcretest\fP proceeds to Line 890  been loaded, \fBpcretest\fP proceeds to
890  You can copy a file written by \fBpcretest\fP to a different host and reload it  You can copy a file written by \fBpcretest\fP to a different host and reload it
891  there, even if the new host has opposite endianness to the one on which the  there, even if the new host has opposite endianness to the one on which the
892  pattern was compiled. For example, you can compile on an i86 machine and run on  pattern was compiled. For example, you can compile on an i86 machine and run on
893  a SPARC machine. When a pattern is reloaded on a host with different  a SPARC machine. When a pattern is reloaded on a host with different
894  endianness, the confirmation message is changed to:  endianness, the confirmation message is changed to:
895  .sp  .sp
896    Compiled pattern (byte-inverted) loaded from /some/file    Compiled pattern (byte-inverted) loaded from /some/file
897  .sp  .sp
898  The test suite contains some saved pre-compiled patterns with different  The test suite contains some saved pre-compiled patterns with different
899  endianness. These are reloaded using "<!" instead of just "<". This suppresses  endianness. These are reloaded using "<!" instead of just "<". This suppresses
900  the "(byte-inverted)" text so that the output is the same on all hosts. It also  the "(byte-inverted)" text so that the output is the same on all hosts. It also
901  forces debugging output once the pattern has been reloaded.  forces debugging output once the pattern has been reloaded.
902  .P  .P
903  File names for saving and reloading can be absolute or relative, but note that  File names for saving and reloading can be absolute or relative, but note that
904  the shell facility of expanding a file name that starts with a tilde (~) is not  the shell facility of expanding a file name that starts with a tilde (~) is not

Legend:
Removed from v.902  
changed lines
  Added in v.903

  ViewVC Help
Powered by ViewVC 1.1.5