OS Manuals

/usr/bin/pcretest

Perl-compatible regular expression library

From pcre 8.45-r12 (os), captured 2026-11-05 by running pcretest --help (exit 0). permalink

Usage:     pcretest [options] [<input file> [<output file>]]

Input and output default to stdin and stdout.
This version of pcretest is not linked with readline().

Options:
  -16      use the 16-bit library
  -32      use the 32-bit library
  -b       show compiled code
  -C       show PCRE compile-time options and exit
  -C arg   show a specific compile-time option and exit
           with its value if numeric (else 0). The arg can be:
     linksize     internal link size [2, 3, 4]
     pcre8        8 bit library support enabled [0, 1]
     pcre16       16 bit library support enabled [0, 1]
     pcre32       32 bit library support enabled [0, 1]
     utf          Unicode Transformation Format supported [0, 1]
     ucp          Unicode Properties supported [0, 1]
     jit          Just-in-time compiler supported [0, 1]
     newline      Newline type [CR, LF, CRLF, ANYCRLF, ANY]
     bsr          \R type [ANYCRLF, ANY]
  -d       debug: show compiled code and information (-b and -i)
  -dfa     force DFA matching for all subjects
  -help    show usage information
  -i       show information about compiled patterns
  -M       find MATCH_LIMIT minimum for each subject
  -m       output memory used information
  -O       set PCRE_NO_AUTO_POSSESS on each pattern
  -o <n>   set size of offsets vector to <n>
  -p       use POSIX interface
  -q       quiet: do not output PCRE version number at start
  -S <n>   set stack size to <n> megabytes
  -s       force each pattern to be studied at basic level
  -s+      force each pattern to be studied, using JIT if available
  -s++     ditto, verifying when JIT was actually used
  -s+n     force each pattern to be studied, using JIT if available,
             where 1 <= n <= 7 selects JIT options
  -s++n    ditto, verifying when JIT was actually used
  -t       time compilation and execution
  -t <n>   time compilation and execution, repeating <n> times
  -tm      time execution (matching) only
  -tm <n>  time execution (matching) only, repeating <n> times
  -T       same as -t, but show total times at the end
  -TM      same as -tm, but show total time at the end
Options (25)
OptionDescriptionSource
-16If the 16-bit library has been built, this option causes it to be used.help + man
-32If the 32-bit library has been built, this option causes it to be used.help + man
-bBehave as if each pattern has the /B (show byte code) modifier;help + man
-COutput the version number of the PCRE library, and all available information about the optional features that are included, and then exit with zero exit code.help + man
-dBehave as if each pattern has the /D (debug) modifier;help + man
-dfaBehave as if each data line contains the D escape sequence;help + man
-helpOutput a brief summary these options and then exit.help + man
-iBehave as if each pattern has the /I modifier;help + man
-MBehave as if each data line contains the M escape sequence;help + man
-mOutput the size of each compiled pattern after it has been compiled.help + man
-OBehave as if each pattern has the /O modifier, that is disable auto-possessification for all patterns.help + man
-o nSet the number of elements in the output vector that is used when calling pcre[16|32]_exec() or pcre[16|32]_dfa_exec() to be osize.help + man
-pBehave as if each pattern has the /P modifier;help + man
-qDo not output the version number of pcretest at the start of execution.help + man
-S nOn Unix-like systems, set the size of the run-time stack to size megabytes.help + man
-sforce each pattern to be studied at basic levelhelp + man
-s+force each pattern to be studied, using JIT if availablehelp
-s++ditto, verifying when JIT was actually usedhelp
-s+nforce each pattern to be studied, using JIT if available, where 1 <= n <= 7 selects JIT optionshelp
-s++nditto, verifying when JIT was actually usedhelp
-tRun each compile, study, and match many times with a timer, and output the resulting times per compile, study, or match (in milliseconds).help + man
-tmThis is like -t except that it times only the matching phase, not the compile or study phases.help + man
-T -TMThese behave like -t and -tm, but in addition, at the end of a run, the total times for all compiles, studies, and matches are output.help + man
-TMsame as -tm, but show total time at the endhelp
-8If the 8-bit library has been built, this option causes it to be used (this is the default). (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.