Annotation of embedaddon/pcre/doc/pcre_compile.3, revision 1.1.1.4

1.1.1.4 ! misho       1: .TH PCRE_COMPILE 3 "24 June 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_compile(const char *\fIpattern\fP, int \fIoptions\fP,
                     11: .ti +5n
                     12: .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
                     13: .ti +5n
                     14: .B const unsigned char *\fItableptr\fP);
1.1.1.2   misho      15: .PP
                     16: .B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
                     17: .ti +5n
                     18: .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
                     19: .ti +5n
                     20: .B const unsigned char *\fItableptr\fP);
1.1.1.4 ! misho      21: .PP
        !            22: .B pcre32 *pcre32_compile(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
        !            23: .ti +5n
        !            24: .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
        !            25: .ti +5n
        !            26: .B const unsigned char *\fItableptr\fP);
1.1       misho      27: .
                     28: .SH DESCRIPTION
                     29: .rs
                     30: .sp
                     31: This function compiles a regular expression into an internal form. It is the
1.1.1.4 ! misho      32: same as \fBpcre[16|32]_compile2()\fP, except for the absence of the
1.1.1.2   misho      33: \fIerrorcodeptr\fP argument. Its arguments are:
1.1       misho      34: .sp
                     35:   \fIpattern\fP       A zero-terminated string containing the
                     36:                   regular expression to be compiled
                     37:   \fIoptions\fP       Zero or more option bits
                     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.1.4 ! misho      70:   PCRE_NO_UTF32_CHECK     Do not check the pattern for UTF-32
        !            71:                             validity (only relevant if
        !            72:                             PCRE_UTF32 is set)
1.1       misho      73:   PCRE_NO_UTF8_CHECK      Do not check the pattern for UTF-8
                     74:                             validity (only relevant if
                     75:                             PCRE_UTF8 is set)
                     76:   PCRE_UCP                Use Unicode properties for \ed, \ew, etc.
                     77:   PCRE_UNGREEDY           Invert greediness of quantifiers
1.1.1.2   misho      78:   PCRE_UTF16              Run in \fBpcre16_compile()\fP UTF-16 mode
1.1.1.4 ! misho      79:   PCRE_UTF32              Run in \fBpcre32_compile()\fP UTF-32 mode
1.1.1.2   misho      80:   PCRE_UTF8               Run in \fBpcre_compile()\fP UTF-8 mode
1.1       misho      81: .sp
1.1.1.4 ! misho      82: PCRE must be built with UTF support in order to use PCRE_UTF8/16/32 and
        !            83: PCRE_NO_UTF8/16/32_CHECK, and with UCP support if PCRE_UCP is used.
1.1       misho      84: .P
                     85: The yield of the function is a pointer to a private data structure that
                     86: contains the compiled pattern, or NULL if an error was detected. Note that
                     87: compiling regular expressions with one version of PCRE for use with a different
                     88: version is not guaranteed to work and may cause crashes.
                     89: .P
                     90: There is a complete description of the PCRE native API in the
                     91: .\" HREF
                     92: \fBpcreapi\fP
                     93: .\"
                     94: page and a description of the POSIX API in the
                     95: .\" HREF
                     96: \fBpcreposix\fP
                     97: .\"
                     98: page.

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