/[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 368 by ph10, Sun Aug 24 16:25:20 2008 UTC revision 412 by ph10, Sat Apr 11 10:34:37 2009 UTC
# Line 317  properties is available; otherwise it is Line 317  properties is available; otherwise it is
317  .sp  .sp
318  The output is an integer whose value specifies the default character sequence  The output is an integer whose value specifies the default character sequence
319  that is recognized as meaning "newline". The four values that are supported  that is recognized as meaning "newline". The four values that are supported
320  are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY. The  are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY.
321  default should normally be the standard sequence for your operating system.  Though they are derived from ASCII, the same values are returned in EBCDIC
322    environments. The default should normally correspond to the standard sequence
323    for your operating system.
324  .sp  .sp
325    PCRE_CONFIG_BSR    PCRE_CONFIG_BSR
326  .sp  .sp
# Line 347  documentation. Line 349  documentation.
349  .sp  .sp
350    PCRE_CONFIG_MATCH_LIMIT    PCRE_CONFIG_MATCH_LIMIT
351  .sp  .sp
352  The output is an integer that gives the default limit for the number of  The output is a long integer that gives the default limit for the number of
353  internal matching function calls in a \fBpcre_exec()\fP execution. Further  internal matching function calls in a \fBpcre_exec()\fP execution. Further
354  details are given with \fBpcre_exec()\fP below.  details are given with \fBpcre_exec()\fP below.
355  .sp  .sp
356    PCRE_CONFIG_MATCH_LIMIT_RECURSION    PCRE_CONFIG_MATCH_LIMIT_RECURSION
357  .sp  .sp
358  The output is an integer that gives the default limit for the depth of  The output is a long integer that gives the default limit for the depth of
359  recursion when calling the internal matching function in a \fBpcre_exec()\fP  recursion when calling the internal matching function in a \fBpcre_exec()\fP
360  execution. Further details are given with \fBpcre_exec()\fP below.  execution. Further details are given with \fBpcre_exec()\fP below.
361  .sp  .sp
# Line 404  argument, which is an address (see below Line 406  argument, which is an address (see below
406  .P  .P
407  The \fIoptions\fP argument contains various bit settings that affect the  The \fIoptions\fP argument contains various bit settings that affect the
408  compilation. It should be zero if no options are required. The available  compilation. It should be zero if no options are required. The available
409  options are described below. Some of them, in particular, those that are  options are described below. Some of them (in particular, those that are
410  compatible with Perl, can also be set and unset from within the pattern (see  compatible with Perl, but also some others) can also be set and unset from
411  the detailed description in the  within the pattern (see the detailed description in the
412  .\" HREF  .\" HREF
413  \fBpcrepattern\fP  \fBpcrepattern\fP
414  .\"  .\"
415  documentation). For these options, the contents of the \fIoptions\fP argument  documentation). For those options that can be different in different parts of
416  specifies their initial settings at the start of compilation and execution. The  the pattern, the contents of the \fIoptions\fP argument specifies their initial
417  PCRE_ANCHORED and PCRE_NEWLINE_\fIxxx\fP options can be set at the time of  settings at the start of compilation and execution. The PCRE_ANCHORED and
418  matching as well as at compile time.  PCRE_NEWLINE_\fIxxx\fP options can be set at the time of matching as well as at
419    compile time.
420  .P  .P
421  If \fIerrptr\fP is NULL, \fBpcre_compile()\fP returns NULL immediately.  If \fIerrptr\fP is NULL, \fBpcre_compile()\fP returns NULL immediately.
422  Otherwise, if compilation of a pattern fails, \fBpcre_compile()\fP returns  Otherwise, if compilation of a pattern fails, \fBpcre_compile()\fP returns
# Line 1237  documentation for a discussion of saving Line 1240  documentation for a discussion of saving
1240  .sp  .sp
1241  The unused bits of the \fIoptions\fP argument for \fBpcre_exec()\fP must be  The unused bits of the \fIoptions\fP argument for \fBpcre_exec()\fP must be
1242  zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_\fIxxx\fP,  zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_\fIxxx\fP,
1243  PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK and PCRE_PARTIAL.  PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_START_OPTIMIZE,
1244    PCRE_NO_UTF8_CHECK and PCRE_PARTIAL.
1245  .sp  .sp
1246    PCRE_ANCHORED    PCRE_ANCHORED
1247  .sp  .sp
# Line 1324  PCRE_NOTEMPTY and PCRE_ANCHORED, and the Line 1328  PCRE_NOTEMPTY and PCRE_ANCHORED, and the
1328  starting offset (see below) and trying an ordinary match again. There is some  starting offset (see below) and trying an ordinary match again. There is some
1329  code that demonstrates how to do this in the \fIpcredemo.c\fP sample program.  code that demonstrates how to do this in the \fIpcredemo.c\fP sample program.
1330  .sp  .sp
1331      PCRE_NO_START_OPTIMIZE
1332    .sp
1333    There are a number of optimizations that \fBpcre_exec()\fP uses at the start of
1334    a match, in order to speed up the process. For example, if it is known that a
1335    match must start with a specific character, it searches the subject for that
1336    character, and fails immediately if it cannot find it, without actually running
1337    the main matching function. When callouts are in use, these optimizations can
1338    cause them to be skipped. This option disables the "start-up" optimizations,
1339    causing performance to suffer, but ensuring that the callouts do occur.
1340    .sp
1341    PCRE_NO_UTF8_CHECK    PCRE_NO_UTF8_CHECK
1342  .sp  .sp
1343  When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8  When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8
# Line 1423  rounded down. Line 1437  rounded down.
1437  .P  .P
1438  When a match is successful, information about captured substrings is returned  When a match is successful, information about captured substrings is returned
1439  in pairs of integers, starting at the beginning of \fIovector\fP, and  in pairs of integers, starting at the beginning of \fIovector\fP, and
1440  continuing up to two-thirds of its length at the most. The first element of  continuing up to two-thirds of its length at the most. The first element of
1441  each pair is set to the byte offset of the first character in a substring, and  each pair is set to the byte offset of the first character in a substring, and
1442  the second is set to the byte offset of the first character after the end of a  the second is set to the byte offset of the first character after the end of a
1443  substring. \fBNote\fP: these values are always byte offsets, even in UTF-8  substring. \fBNote\fP: these values are always byte offsets, even in UTF-8
# Line 1729  These functions call \fBpcre_get_stringn Line 1743  These functions call \fBpcre_get_stringn
1743  then call \fBpcre_copy_substring()\fP or \fBpcre_get_substring()\fP, as  then call \fBpcre_copy_substring()\fP or \fBpcre_get_substring()\fP, as
1744  appropriate. \fBNOTE:\fP If PCRE_DUPNAMES is set and there are duplicate names,  appropriate. \fBNOTE:\fP If PCRE_DUPNAMES is set and there are duplicate names,
1745  the behaviour may not be what you want (see the next section).  the behaviour may not be what you want (see the next section).
1746  .  .P
1747    \fBWarning:\fP If the pattern uses the "(?|" feature to set up multiple
1748    subpatterns with the same number, you cannot use names to distinguish them,
1749    because names are not included in the compiled code. The matching process uses
1750    only numbers.
1751  .  .
1752  .SH "DUPLICATE SUBPATTERN NAMES"  .SH "DUPLICATE SUBPATTERN NAMES"
1753  .rs  .rs
# Line 1978  Cambridge CB2 3QH, England. Line 1996  Cambridge CB2 3QH, England.
1996  .rs  .rs
1997  .sp  .sp
1998  .nf  .nf
1999  Last updated: 24 August 2008  Last updated: 11 April 2009
2000  Copyright (c) 1997-2008 University of Cambridge.  Copyright (c) 1997-2009 University of Cambridge.
2001  .fi  .fi

Legend:
Removed from v.368  
changed lines
  Added in v.412

  ViewVC Help
Powered by ViewVC 1.1.5