/[pcre]/code/trunk/doc/pcreapi.3
ViewVC logotype

Diff of /code/trunk/doc/pcreapi.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 461 by ph10, Mon Oct 5 10:59:35 2009 UTC revision 518 by ph10, Tue May 18 15:47:01 2010 UTC
# Line 553  set, any backslash in a pattern that is Line 553  set, any backslash in a pattern that is
553  special meaning causes an error, thus reserving these combinations for future  special meaning causes an error, thus reserving these combinations for future
554  expansion. By default, as in Perl, a backslash followed by a letter with no  expansion. By default, as in Perl, a backslash followed by a letter with no
555  special meaning is treated as a literal. (Perl can, however, be persuaded to  special meaning is treated as a literal. (Perl can, however, be persuaded to
556  give a warning for this.) There are at present no other features controlled by  give an error for this, by running it with the -w option.) There are at present
557  this option. It can also be set by a (?X) option setting within a pattern.  no other features controlled by this option. It can also be set by a (?X)
558    option setting within a pattern.
559  .sp  .sp
560    PCRE_FIRSTLINE    PCRE_FIRSTLINE
561  .sp  .sp
# Line 635  were followed by ?: but named parenthese Line 636  were followed by ?: but named parenthese
636  they acquire numbers in the usual way). There is no equivalent of this option  they acquire numbers in the usual way). There is no equivalent of this option
637  in Perl.  in Perl.
638  .sp  .sp
639      PCRE_UCP
640    .sp
641    This option changes the way PCRE processes \eb, \ed, \es, \ew, and some of the
642    POSIX character classes. By default, only ASCII characters are recognized, but
643    if PCRE_UCP is set, Unicode properties are used instead to classify characters.
644    More details are given in the section on
645    .\" HTML <a href="pcre.html#genericchartypes">
646    .\" </a>
647    generic character types
648    .\"
649    in the
650    .\" HREF
651    \fBpcrepattern\fP
652    .\"
653    page. If you set PCRE_UCP, matching one of the items it affects takes much
654    longer. The option is available only if PCRE has been compiled with Unicode
655    property support.
656    .sp
657    PCRE_UNGREEDY    PCRE_UNGREEDY
658  .sp  .sp
659  This option inverts the "greediness" of the quantifiers so that they are not  This option inverts the "greediness" of the quantifiers so that they are not
# Line 747  out of use. To avoid confusion, they hav Line 766  out of use. To avoid confusion, they hav
766    57  \eg is not followed by a braced, angle-bracketed, or quoted    57  \eg is not followed by a braced, angle-bracketed, or quoted
767          name/number or by a plain number          name/number or by a plain number
768    58  a numbered reference must not be zero    58  a numbered reference must not be zero
769    59  (*VERB) with an argument is not supported    59  an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
770    60  (*VERB) not recognized    60  (*VERB) not recognized
771    61  number is too big    61  number is too big
772    62  subpattern name expected    62  subpattern name expected
773    63  digit expected after (?+    63  digit expected after (?+
774    64  ] is an invalid data character in JavaScript compatibility mode    64  ] is an invalid data character in JavaScript compatibility mode
775      65  different names for subpatterns of the same number are not allowed
776      66  (*MARK) must have an argument
777      67  this version of PCRE is not compiled with PCRE_UCP support
778  .sp  .sp
779  The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may  The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may
780  be used if the limits were changed when PCRE was built.  be used if the limits were changed when PCRE was built.
# Line 827  matching. Line 849  matching.
849  PCRE handles caseless matching, and determines whether characters are letters,  PCRE handles caseless matching, and determines whether characters are letters,
850  digits, or whatever, by reference to a set of tables, indexed by character  digits, or whatever, by reference to a set of tables, indexed by character
851  value. When running in UTF-8 mode, this applies only to characters with codes  value. When running in UTF-8 mode, this applies only to characters with codes
852  less than 128. Higher-valued codes never match escapes such as \ew or \ed, but  less than 128. By default, higher-valued codes never match escapes such as \ew
853  can be tested with \ep if PCRE is built with Unicode character property  or \ed, but they can be tested with \ep if PCRE is built with Unicode character
854  support. The use of locales with Unicode is discouraged. If you are handling  property support. Alternatively, the PCRE_UCP option can be set at compile
855  characters with codes greater than 128, you should either use UTF-8 and  time; this causes \ew and friends to use Unicode property support instead of
856  Unicode, or use locales, but not try to mix the two.  built-in tables. The use of locales with Unicode is discouraged. If you are
857    handling characters with codes greater than 128, you should either use UTF-8
858    and Unicode, or use locales, but not try to mix the two.
859  .P  .P
860  PCRE contains an internal set of tables that are used when the final argument  PCRE contains an internal set of tables that are used when the final argument
861  of \fBpcre_compile()\fP is NULL. These are sufficient for many applications.  of \fBpcre_compile()\fP is NULL. These are sufficient for many applications.
# Line 1210  fields (not necessarily in this order): Line 1234  fields (not necessarily in this order):
1234    unsigned long int \fImatch_limit_recursion\fP;    unsigned long int \fImatch_limit_recursion\fP;
1235    void *\fIcallout_data\fP;    void *\fIcallout_data\fP;
1236    const unsigned char *\fItables\fP;    const unsigned char *\fItables\fP;
1237      unsigned char **\fImark\fP;
1238  .sp  .sp
1239  The \fIflags\fP field is a bitmap that specifies which of the other fields  The \fIflags\fP field is a bitmap that specifies which of the other fields
1240  are set. The flag bits are:  are set. The flag bits are:
# Line 1219  are set. The flag bits are: Line 1244  are set. The flag bits are:
1244    PCRE_EXTRA_MATCH_LIMIT_RECURSION    PCRE_EXTRA_MATCH_LIMIT_RECURSION
1245    PCRE_EXTRA_CALLOUT_DATA    PCRE_EXTRA_CALLOUT_DATA
1246    PCRE_EXTRA_TABLES    PCRE_EXTRA_TABLES
1247      PCRE_EXTRA_MARK
1248  .sp  .sp
1249  Other flag bits should be set to zero. The \fIstudy_data\fP field is set in the  Other flag bits should be set to zero. The \fIstudy_data\fP field is set in the
1250  \fBpcre_extra\fP block that is returned by \fBpcre_study()\fP, together with  \fBpcre_extra\fP block that is returned by \fBpcre_study()\fP, together with
# Line 1281  called. See the Line 1307  called. See the
1307  \fBpcreprecompile\fP  \fBpcreprecompile\fP
1308  .\"  .\"
1309  documentation for a discussion of saving compiled patterns for later use.  documentation for a discussion of saving compiled patterns for later use.
1310    .P
1311    If PCRE_EXTRA_MARK is set in the \fIflags\fP field, the \fImark\fP field must
1312    be set to point to a \fBchar *\fP variable. If the pattern contains any
1313    backtracking control verbs such as (*MARK:NAME), and the execution ends up with
1314    a name to pass back, a pointer to the name string (zero terminated) is placed
1315    in the variable pointed to by the \fImark\fP field. The names are within the
1316    compiled pattern; if you wish to retain such a name you must copy it before
1317    freeing the memory of a compiled pattern. If there is no name to pass back, the
1318    variable pointed to by the \fImark\fP field set to NULL. For details of the
1319    backtracking control verbs, see the section entitled
1320    .\" HTML <a href="pcrepattern#backtrackcontrol">
1321    .\" </a>
1322    "Backtracking control"
1323    .\"
1324    in the
1325    .\" HREF
1326    \fBpcrepattern\fP
1327    .\"
1328    documentation.
1329    .
1330  .  .
1331  .\" HTML <a name="execoptions"></a>  .\" HTML <a name="execoptions"></a>
1332  .SS "Option bits for \fBpcre_exec()\fP"  .SS "Option bits for \fBpcre_exec()\fP"
# Line 2075  Cambridge CB2 3QH, England. Line 2121  Cambridge CB2 3QH, England.
2121  .rs  .rs
2122  .sp  .sp
2123  .nf  .nf
2124  Last updated: 03 October 2009  Last updated: 16 May 2010
2125  Copyright (c) 1997-2009 University of Cambridge.  Copyright (c) 1997-2010 University of Cambridge.
2126  .fi  .fi

Legend:
Removed from v.461  
changed lines
  Added in v.518

  ViewVC Help
Powered by ViewVC 1.1.5