Introduction to Library Functions PCRECOMPILE(3)
NAME
PCRE - Perl-compatible regular expressions
SYNOPSIS
#include
pcre *pcrecompile(const char *pattern, int options,
const char **errptr, int *erroffset,
const unsigned char *tableptr);
DESCRIPTION
This function compiles a regular expression into an internal
form. It is the same as pcrecompile2(), except for the
absence of the errorcodeptr argument. Its arguments are:
pattern A zero-terminated string containing the
regular expression to be compiled
options Zero or more option bits
errptr Where to put an error message
erroffset Offset in pattern where error was found
tableptr Pointer to character tables, or NUL to
use the built-in default
The option bits are:
PCREANCHORED Force pattern anchoring
PCREAUTOCALOUT Compile automatic callouts
PCREBSRANYCRLF \R matches only CR, LF, or CRLF
PCREBSRUNICODE \R matches all Unicode line end-
ings
PCRECASELES Do caseless matching
PCREDOLARENDONLY $ not to match newline at end
PCREDOTAL . matches anything including NL
PCREDUPNAMES Allow duplicate names for subpat-
terns
PCREXTENDED Ignore whitespace and # comments
PCREXTRA PCRE extra features
(not much use currently)
PCREFIRSTLINE Force matching to be before new-
line
PCREJAVASCRIPTCOMPAT JavaScript compatibility
PCREMULTILINE ^ and $ match newlines within data
PCRENEWLINEANY Recognize any Unicode newline
sequence
PCRENEWLINEANYCRLF Recognize CR, LF, and CRLF as new-
line
sequences
PCRENEWLINECR Set CR as the newline sequence
PCRENEWLINECRLF Set CRLF as the newline sequence
PCRENEWLINELF Set LF as the newline sequence
SunOS 5.10 Last change: 1
Introduction to Library Functions PCRECOMPILE(3)
PCRENOAUTOCAPTURE Disable numbered capturing paren-
theses (named ones available)
PCREUNGREDY Invert greediness of quantifiers
PCREUTF8 Run in UTF-8 mode
PCRENOUTF8CHECK Do not check the pattern for UTF-8
validity (only relevant if
PCREUTF8 is set)
PCRE must be built with UTF-8 support in order to use
PCREUTF8 and PCRENOUTF8CHECK.
The yield of the function is a pointer to a private data
structure that contains the compiled pattern, or NUL if an
error was detected. Note that compiling regular expressions
with one version of PCRE for use with a different version is
not guaranteed to work and may cause crashes.
There is a complete description of the PCRE native API in
the pcreapi page and a description of the POSIX API in the
pcreposix page.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWpcre
Interface Stability Uncommitted
NOTES
Source for PCRE is available on http:/opensolaris.org.
SunOS 5.10 Last change: 2
|