/[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 1387 by ph10, Wed Oct 9 10:18:26 2013 UTC revision 1388 by ph10, Tue Nov 5 15:24:45 2013 UTC
# Line 1  Line 1 
1  .TH PCRETEST 1 "09 October 2013" "PCRE 8.34"  .TH PCRETEST 1 "05 November 2013" "PCRE 8.34"
2  .SH NAME  .SH NAME
3  pcretest - a program for testing Perl-compatible regular expressions.  pcretest - a program for testing Perl-compatible regular expressions.
4  .SH SYNOPSIS  .SH SYNOPSIS
# Line 254  option states whether or not \fBreadline Line 254  option states whether or not \fBreadline
254  .P  .P
255  The program handles any number of sets of input on a single input file. Each  The program handles any number of sets of input on a single input file. Each
256  set starts with a regular expression, and continues with any number of data  set starts with a regular expression, and continues with any number of data
257  lines to be matched against the pattern.  lines to be matched against that pattern.
258  .P  .P
259  Each data line is matched separately and independently. If you want to do  Each data line is matched separately and independently. If you want to do
260  multi-line matches, you have to use the \en escape sequence (or \er or \er\en,  multi-line matches, you have to use the \en escape sequence (or \er or \er\en,
# Line 595  The \fB/+\fP modifier works as described Line 595  The \fB/+\fP modifier works as described
595  ignored.  ignored.
596  .  .
597  .  .
598    .SS "Locking out certain modifiers"
599    .rs
600    .sp
601    PCRE can be compiled with or without support for certain features such as
602    UTF-8/16/32 or Unicode properties. Accordingly, the standard tests are split up
603    into a number of different files that are selected for running depending on
604    which features are available. When updating the tests, it is all too easy to
605    put a new test into the wrong file by mistake; for example, to put a test that
606    requires UTF support into a file that is used when it is not available. To help
607    detect such mistakes as early as possible, there is a facility for locking out
608    specific modifiers. If an input line for \fBpcretest\fP starts with the string
609    "< forbid " the following sequence of characters is taken as a list of
610    forbidden modifiers. For example, in the test files that must not use UTF or
611    Unicode property support, this line appears:
612    .sp
613      < forbid 8W
614    .sp
615    This locks out the /8 and /W modifiers. An immediate error is given if they are
616    subsequently encountered. If the character string contains < but not >, all the
617    multi-character modifiers that begin with < are locked out. Otherwise, such
618    modifiers must be explicitly listed, for example:
619    .sp
620      < forbid <JS><cr>
621    .sp
622    There must be a single space between < and "forbid" for this feature to be
623    recognised. If there is not, the line is interpreted either as a request to
624    re-load a pre-compiled pattern (see "SAVING AND RELOADING COMPILED PATTERNS"
625    below) or, if there is a another < character, as a pattern that uses < as its
626    delimiter.
627    .
628    .
629  .SH "DATA LINES"  .SH "DATA LINES"
630  .rs  .rs
631  .sp  .sp
# Line 1042  exact copy of the compiled pattern. If t Line 1073  exact copy of the compiled pattern. If t
1073  writing the file, \fBpcretest\fP expects to read a new pattern.  writing the file, \fBpcretest\fP expects to read a new pattern.
1074  .P  .P
1075  A saved pattern can be reloaded into \fBpcretest\fP by specifying < and a file  A saved pattern can be reloaded into \fBpcretest\fP by specifying < and a file
1076  name instead of a pattern. The name of the file must not contain a < character,  name instead of a pattern. There must be no space between < and the file name,
1077  as otherwise \fBpcretest\fP will interpret the line as a pattern delimited by <  which must not contain a < character, as otherwise \fBpcretest\fP will
1078  characters.  interpret the line as a pattern delimited by < characters. For example:
 For example:  
1079  .sp  .sp
1080     re> </some/file     re> </some/file
1081    Compiled pattern loaded from /some/file    Compiled pattern loaded from /some/file
# Line 1105  Cambridge CB2 3QH, England. Line 1135  Cambridge CB2 3QH, England.
1135  .rs  .rs
1136  .sp  .sp
1137  .nf  .nf
1138  Last updated: 09 October 2013  Last updated: 05 November 2013
1139  Copyright (c) 1997-2013 University of Cambridge.  Copyright (c) 1997-2013 University of Cambridge.
1140  .fi  .fi

Legend:
Removed from v.1387  
changed lines
  Added in v.1388

  ViewVC Help
Powered by ViewVC 1.1.5