--- embedaddon/pcre/doc/html/pcretest.html 2013/07/22 08:25:57 1.1.1.4 +++ embedaddon/pcre/doc/html/pcretest.html 2014/06/15 19:46:05 1.1.1.5 @@ -187,6 +187,11 @@ equivalent to adding /M to each regular express bytes for both libraries.

+-O +Behave as if each pattern has the /O modifier, that is disable +auto-possessification for all patterns. +

+

-o osize Set 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. The @@ -256,19 +261,24 @@ should never be studied (see the /S pattern mod

-t -Run each compile, study, and match many times with a timer, and output -resulting time per compile or match (in milliseconds). Do not set -m with --t, because you will then get the size output a zillion times, and the -timing will be distorted. You can control the number of iterations that are -used for timing by following -t with a number (as a separate item on the -command line). For example, "-t 1000" would iterate 1000 times. The default is -to iterate 500000 times. +Run each compile, study, and match many times with a timer, and output the +resulting times per compile, study, or match (in milliseconds). Do not set +-m with -t, because you will then get the size output a zillion +times, and the timing will be distorted. You can control the number of +iterations that are used for timing by following -t with a number (as a +separate item on the command line). For example, "-t 1000" iterates 1000 times. +The default is to iterate 500000 times.

-tm This is like -t except that it times only the matching phase, not the compile or study phases.

+

+-T -TM +These 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. +


DESCRIPTION

If pcretest is given two filename arguments, it reads from the first and @@ -287,7 +297,7 @@ option states whether or not readline() will be

The program handles any number of sets of input on a single input file. Each set starts with a regular expression, and continues with any number of data -lines to be matched against the pattern. +lines to be matched against that pattern.

Each data line is matched separately and independently. If you want to do @@ -361,6 +371,7 @@ sections. /M show compiled memory size /m set PCRE_MULTILINE /N set PCRE_NO_AUTO_CAPTURE + /O set PCRE_NO_AUTO_POSSESS /P use the POSIX wrapper /S study the pattern after compilation /s set PCRE_DOTALL @@ -419,6 +430,7 @@ options that do not correspond to anything in Perl: /f PCRE_FIRSTLINE /J PCRE_DUPNAMES /N PCRE_NO_AUTO_CAPTURE + /O PCRE_NO_AUTO_POSSESS /U PCRE_UNGREEDY /W PCRE_UCP /X PCRE_EXTRA @@ -562,8 +574,8 @@ matched. There are a number of qualifying characters t They may appear in any order.

-If S is followed by an exclamation mark, pcre[16|32]_study() is called -with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a +If /S is followed by an exclamation mark, pcre[16|32]_study() is +called with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a pcre_extra block, even when studying discovers no useful information.

@@ -642,6 +654,37 @@ function: The /+ modifier works as described above. All other modifiers are ignored.

+
+Locking out certain modifiers +
+

+PCRE can be compiled with or without support for certain features such as +UTF-8/16/32 or Unicode properties. Accordingly, the standard tests are split up +into a number of different files that are selected for running depending on +which features are available. When updating the tests, it is all too easy to +put a new test into the wrong file by mistake; for example, to put a test that +requires UTF support into a file that is used when it is not available. To help +detect such mistakes as early as possible, there is a facility for locking out +specific modifiers. If an input line for pcretest starts with the string +"< forbid " the following sequence of characters is taken as a list of +forbidden modifiers. For example, in the test files that must not use UTF or +Unicode property support, this line appears: +

+  < forbid 8W
+
+This locks out the /8 and /W modifiers. An immediate error is given if they are +subsequently encountered. If the character string contains < but not >, all the +multi-character modifiers that begin with < are locked out. Otherwise, such +modifiers must be explicitly listed, for example: +
+  < forbid <JS><cr>
+
+There must be a single space between < and "forbid" for this feature to be +recognised. If there is not, the line is interpreted either as a request to +re-load a pre-compiled pattern (see "SAVING AND RELOADING COMPILED PATTERNS" +below) or, if there is a another < character, as a pattern that uses < as its +delimiter. +


DATA LINES

Before each data line is passed to pcre[16|32]_exec(), leading and trailing @@ -662,6 +705,7 @@ recognized: \v vertical tab (\x0b) \nnn octal character (up to 3 octal digits); always a byte unless > 255 in UTF-8 or 16-bit or 32-bit mode + \o{dd...} octal character (any number of octal digits} \xhh hexadecimal byte (up to 2 hex digits) \x{hh...} hexadecimal character (any number of hex digits) \A pass the PCRE_ANCHORED option to pcre[16|32]_exec() or pcre[16|32]_dfa_exec() @@ -1031,10 +1075,9 @@ writing the file, pcretest expects to read a ne

A saved pattern can be reloaded into pcretest by specifying < and a file -name instead of a pattern. The name of the file must not contain a < character, -as otherwise pcretest will interpret the line as a pattern delimited by < -characters. -For example: +name instead of a pattern. There must be no space between < and the file name, +which must not contain a < character, as otherwise pcretest will +interpret the line as a pattern delimited by < characters. For example:

    re> </some/file
   Compiled pattern loaded from /some/file
@@ -1091,7 +1134,7 @@ Cambridge CB2 3QH, England.
 


REVISION

-Last updated: 26 April 2013 +Last updated: 12 November 2013
Copyright © 1997-2013 University of Cambridge.