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

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

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

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

Legend:
Removed from v.91  
changed lines
  Added in v.968

  ViewVC Help
Powered by ViewVC 1.1.5