Annotation of embedaddon/pcre/doc/pcre_compile2.3, revision 1.1.1.3

1.1.1.3 ! misho       1: .TH PCRE_COMPILE2 3 "13 January 2012" "PCRE 8.30"
1.1       misho       2: .SH NAME
                      3: PCRE - Perl-compatible regular expressions
                      4: .SH SYNOPSIS
                      5: .rs
                      6: .sp
                      7: .B #include <pcre.h>
                      8: .PP
                      9: .SM
                     10: .B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
                     11: .ti +5n
                     12: .B int *\fIerrorcodeptr\fP,
                     13: .ti +5n
                     14: .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
                     15: .ti +5n
                     16: .B const unsigned char *\fItableptr\fP);
1.1.1.2   misho      17: .PP
                     18: .B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
                     19: .ti +5n
                     20: .B int *\fIerrorcodeptr\fP,
                     21: .ti +5n
                     22: .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
                     23: .ti +5n
                     24: .B const unsigned char *\fItableptr\fP);
1.1       misho      25: .
                     26: .SH DESCRIPTION
                     27: .rs
                     28: .sp
                     29: This function compiles a regular expression into an internal form. It is the
1.1.1.2   misho      30: same as \fBpcre[16]_compile()\fP, except for the addition of the
                     31: \fIerrorcodeptr\fP argument. The arguments are:
1.1       misho      32: .
                     33: .sp
                     34:   \fIpattern\fP       A zero-terminated string containing the
                     35:                   regular expression to be compiled
                     36:   \fIoptions\fP       Zero or more option bits
                     37:   \fIerrorcodeptr\fP  Where to put an error code
                     38:   \fIerrptr\fP        Where to put an error message
                     39:   \fIerroffset\fP     Offset in pattern where error was found
                     40:   \fItableptr\fP      Pointer to character tables, or NULL to
                     41:                   use the built-in default
                     42: .sp
                     43: The option bits are:
                     44: .sp
                     45:   PCRE_ANCHORED           Force pattern anchoring
                     46:   PCRE_AUTO_CALLOUT       Compile automatic callouts
                     47:   PCRE_BSR_ANYCRLF        \eR matches only CR, LF, or CRLF
                     48:   PCRE_BSR_UNICODE        \eR matches all Unicode line endings
                     49:   PCRE_CASELESS           Do caseless matching
                     50:   PCRE_DOLLAR_ENDONLY     $ not to match newline at end
                     51:   PCRE_DOTALL             . matches anything including NL
                     52:   PCRE_DUPNAMES           Allow duplicate names for subpatterns
1.1.1.3 ! misho      53:   PCRE_EXTENDED           Ignore white space and # comments
1.1       misho      54:   PCRE_EXTRA              PCRE extra features
                     55:                             (not much use currently)
                     56:   PCRE_FIRSTLINE          Force matching to be before newline
                     57:   PCRE_JAVASCRIPT_COMPAT  JavaScript compatibility
                     58:   PCRE_MULTILINE          ^ and $ match newlines within data
                     59:   PCRE_NEWLINE_ANY        Recognize any Unicode newline sequence
                     60:   PCRE_NEWLINE_ANYCRLF    Recognize CR, LF, and CRLF as newline
                     61:                             sequences
                     62:   PCRE_NEWLINE_CR         Set CR as the newline sequence
                     63:   PCRE_NEWLINE_CRLF       Set CRLF as the newline sequence
                     64:   PCRE_NEWLINE_LF         Set LF as the newline sequence
                     65:   PCRE_NO_AUTO_CAPTURE    Disable numbered capturing paren-
                     66:                             theses (named ones available)
1.1.1.2   misho      67:   PCRE_NO_UTF16_CHECK     Do not check the pattern for UTF-16
                     68:                             validity (only relevant if
                     69:                             PCRE_UTF16 is set)
1.1       misho      70:   PCRE_NO_UTF8_CHECK      Do not check the pattern for UTF-8
                     71:                             validity (only relevant if
                     72:                             PCRE_UTF8 is set)
                     73:   PCRE_UCP                Use Unicode properties for \ed, \ew, etc.
                     74:   PCRE_UNGREEDY           Invert greediness of quantifiers
1.1.1.2   misho      75:   PCRE_UTF16              Run \fBpcre16_compile()\fP in UTF-16 mode
                     76:   PCRE_UTF8               Run \fBpcre_compile()\fP in UTF-8 mode
1.1       misho      77: .sp
1.1.1.2   misho      78: PCRE must be built with UTF support in order to use PCRE_UTF8/16 and
                     79: PCRE_NO_UTF8/16_CHECK, and with UCP support if PCRE_UCP is used.
1.1       misho      80: .P
                     81: The yield of the function is a pointer to a private data structure that
                     82: contains the compiled pattern, or NULL if an error was detected. Note that
                     83: compiling regular expressions with one version of PCRE for use with a different
                     84: version is not guaranteed to work and may cause crashes.
                     85: .P
                     86: There is a complete description of the PCRE native API in the
                     87: .\" HREF
                     88: \fBpcreapi\fP
                     89: .\"
                     90: page and a description of the POSIX API in the
                     91: .\" HREF
                     92: \fBpcreposix\fP
                     93: .\"
                     94: page.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>