Commit 74cca641 authored by Alexander Barkov's avatar Alexander Barkov

Upgrading the bundled PCRE to 8.34

parent 2acc01b3
......@@ -8576,7 +8576,7 @@ char *re_eprint(int err)
{
static char epbuf[100];
size_t len __attribute__((unused))=
regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf));
regerror(err, (regex_t *)NULL, epbuf, sizeof(epbuf));
assert(len <= sizeof(epbuf));
return(epbuf);
}
......
......@@ -61,6 +61,10 @@
# 2012-09-08 ChPe added PCRE32 support
# 2012-10-23 PH added support for VALGRIND and GCOV
# 2012-12-08 PH added patch from Daniel Richard G to quash some MSVC warnings
# 2013-07-01 PH realized that the "support" for GCOV was a total nonsense and
# so it has been removed.
# 2013-10-08 PH got rid of the "source" command, which is a bash-ism (use ".")
# 2013-11-05 PH added support for PARENS_NEST_LIMIT
PROJECT(PCRE C CXX)
......@@ -107,6 +111,9 @@ CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG)
SET(PCRE_LINK_SIZE "2" CACHE STRING
"Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.")
SET(PCRE_PARENS_NEST_LIMIT "250" CACHE STRING
"Default nested parentheses limit. See PARENS_NEST_LIMIT in config.h.in for details.")
SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING
"Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.")
......@@ -322,6 +329,15 @@ TARGET_LINK_LIBRARIES(pcreposix pcre)
# Executables
# Removed by PH (2008-01-23) because pcredemo shouldn't really be built
# automatically, and it gave trouble in some environments anyway.
# ADD_EXECUTABLE(pcredemo pcredemo.c)
# TARGET_LINK_LIBRARIES(pcredemo pcreposix)
# IF(NOT BUILD_SHARED_LIBS)
# # make sure to not use declspec(dllimport) in static mode on windows
# SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")
# ENDIF(NOT BUILD_SHARED_LIBS)
IF(PCRE_BUILD_PCREGREP)
ADD_EXECUTABLE(pcregrep pcregrep.c)
SET(targets ${targets} pcregrep)
......@@ -469,17 +485,25 @@ IF(PCRE_SHOW_REPORT)
MESSAGE(STATUS "")
MESSAGE(STATUS "PCRE configuration summary:")
MESSAGE(STATUS "")
# MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
# MESSAGE(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}")
MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}")
# MESSAGE(STATUS " Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")
MESSAGE(STATUS " Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")
MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE_NEWLINE}")
MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")
# MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE_EBCDIC}")
# MESSAGE(STATUS " EBCDIC coding with NL=0x25 ...... : ${PCRE_EBCDIC_NL25}")
# MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}")
MESSAGE(STATUS " No stack recursion .............. : ${PCRE_NO_RECURSE}")
MESSAGE(STATUS " POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}")
MESSAGE(STATUS " Internal link size .............. : ${PCRE_LINK_SIZE}")
MESSAGE(STATUS " Parentheses nest limit .......... : ${PCRE_PARENS_NEST_LIMIT}")
MESSAGE(STATUS " Match limit ..................... : ${PCRE_MATCH_LIMIT}")
MESSAGE(STATUS " Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}")
# MESSAGE(STATUS " Build shared libs ............... : ${BUILD_SHARED_LIBS}")
# MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}")
MESSAGE(STATUS " Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}")
# MESSAGE(STATUS " Enable JIT in pcregrep .......... : ${PCRE_SUPPORT_PCREGREP_JIT}")
MESSAGE(STATUS " Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}")
......
This diff is collapsed.
This diff is collapsed.
News about PCRE releases
------------------------
Release 8.34 15-December-2013
-----------------------------
As well as fixing the inevitable bugs, performance has been improved by
refactoring and extending the amount of "auto-possessification" that PCRE does.
Other notable changes:
. Implemented PCRE_INFO_MATCH_EMPTY, which yields 1 if the pattern can match
an empty string. If it can, pcretest shows this in its information output.
. A back reference to a named subpattern when there is more than one of the
same name now checks them in the order in which they appear in the pattern.
The first one that is set is used for the reference. Previously only the
first one was inspected. This change makes PCRE more compatible with Perl.
. Unicode character properties were updated from Unicode 6.3.0.
. The character VT has been added to the set of characters that match \s and
are generally treated as white space, following this same change in Perl
5.18. There is now no difference between "Perl space" and "POSIX space".
. Perl has changed its handling of \8 and \9. If there is no previously
encountered capturing group of those numbers, they are treated as the
literal characters 8 and 9 instead of a binary zero followed by the
literals. PCRE now does the same.
. Following Perl, added \o{} to specify codepoints in octal, making it
possible to specify values greater than 0777 and also making them
unambiguous.
. In UCP mode, \s was not matching two of the characters that Perl matches,
namely NEL (U+0085) and MONGOLIAN VOWEL SEPARATOR (U+180E), though they
were matched by \h.
. Add JIT support for the 64 bit TileGX architecture.
. Upgraded the handling of the POSIX classes [:graph:], [:print:], and
[:punct:] when PCRE_UCP is set so as to include the same characters as Perl
does in Unicode mode.
. Perl no longer allows group names to start with digits, so I have made this
change also in PCRE.
. Added support for [[:<:]] and [[:>:]] as used in the BSD POSIX library to
mean "start of word" and "end of word", respectively, as a transition aid.
Release 8.33 28-May-2013
--------------------------
......
......@@ -171,8 +171,8 @@ can skip ahead to the CMake section.
pcre16_version.c
pcre16_xclass.c
(8) If you want to build a 16-bit library (as well as, or instead of the 8-bit
or 32-bit libraries) repeat steps 5-6 with the following files:
(8) If you want to build a 32-bit library (as well as, or instead of the 8-bit
or 16-bit libraries) repeat steps 5-6 with the following files:
pcre32_byte_order.c
pcre32_chartables.c
......
......@@ -9,8 +9,10 @@ from:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip
There is a mailing list for discussion about the development of PCRE at
pcre-dev@exim.org. You can access the archives and subscribe or manage your
subscription here:
pcre-dev@exim.org
https://lists.exim.org/mailman/listinfo/pcre-dev
Please read the NEWS file if you are upgrading from a previous release.
The contents of this README file are:
......@@ -112,6 +114,11 @@ contributions provided support for compiling PCRE on various flavours of
Windows (I myself do not use Windows). Nowadays there is more Windows support
in the standard distribution, so these contibutions have been archived.
A PCRE user maintains downloadable Windows binaries of the pcregrep and
pcretest programs here:
http://www.rexegg.com/pcregrep-pcretest.html
Building PCRE on non-Unix-like systems
--------------------------------------
......@@ -262,9 +269,17 @@ library. They are also documented in the pcrebuild man page.
on the "configure" command.
. PCRE has a counter that can be set to limit the amount of resources it uses.
If the limit is exceeded during a match, the match fails. The default is ten
million. You can change the default by setting, for example,
. PCRE has a counter that limits the depth of nesting of parentheses in a
pattern. This limits the amount of system stack that a pattern uses when it
is compiled. The default is 250, but you can change it by setting, for
example,
--with-parens-nest-limit=500
. PCRE has a counter that can be set to limit the amount of resources it uses
when matching a pattern. If the limit is exceeded during a match, the match
fails. The default is ten million. You can change the default by setting, for
example,
--with-match-limit=500000
......@@ -344,7 +359,8 @@ library. They are also documented in the pcrebuild man page.
report is generated by running "make coverage". If ccache is installed on
your system, it must be disabled when building PCRE for coverage reporting.
You can do this by setting the environment variable CCACHE_DISABLE=1 before
running "make" to build PCRE.
running "make" to build PCRE. There is more information about coverage
reporting in the "pcrebuild" documentation.
. The pcregrep program currently supports only 8-bit data files, and so
requires the 8-bit PCRE library. It is possible to compile pcregrep to use
......@@ -971,4 +987,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
Last updated: 28 April 2013
Last updated: 05 November 2013
......@@ -502,6 +502,10 @@ echo "---------------------------- Test 105 -----------------------------" >>tes
(cd $srcdir; $valgrind $pcregrep --colour=always "ipsum|" ./testdata/grepinput3) >>testtry 2>&1
echo "RC=$?" >>testtry
echo "---------------------------- Test 106 -----------------------------" >>testtry
(cd $srcdir; echo "a" | $valgrind $pcregrep -M "|a" ) >>testtry 2>&1
echo "RC=$?" >>testtry
# Now compare the results.
......
......@@ -14,11 +14,11 @@
# UTF-8 with the UTF-8 check turned off; for this, studying must also be
# disabled with /SS.
#
# When JIT support is available, all the tests are also run with -s+ to test
# (again, almost) everything with studying and the JIT option, unless "nojit"
# is given on the command line. There are also two tests for JIT-specific
# features, one to be run when JIT support is available (unless "nojit" is
# specified), and one when it is not.
# When JIT support is available, all appropriate tests are also run with -s+ to
# test (again, almost) everything with studying and the JIT option, unless
# "nojit" is given on the command line. There are also two tests for
# JIT-specific features, one to be run when JIT support is available (unless
# "nojit" is specified), and one when it is not.
#
# Whichever of the 8-, 16- and 32-bit libraries exist are tested. It is also
# possible to select which to test by giving "-8", "-16" or "-32" on the
......@@ -30,9 +30,13 @@
# runs tests 3 to 15, excluding test 10, and just "~10" runs all the tests
# except test 10. Whatever order the arguments are in, the tests are always run
# in numerical order.
#
# Inappropriate tests are automatically skipped (with a comment to say so): for
# example, if JIT support is not compiled, test 12 is skipped, whereas if JIT
# support is compiled, test 13 is skipped.
#
# Other arguments can be one of the words "valgrind", "valgrind-log", or "sim"
# followed by an argument to run cross- compiled executables under a simulator,
# followed by an argument to run cross-compiled executables under a simulator,
# for example:
#
# RunTest 3 sim "qemu-arm -s 8388608"
......@@ -62,8 +66,8 @@ title8="Test 8: DFA matching main functionality"
title9="Test 9: DFA matching with UTF"
title10="Test 10: DFA matching with Unicode properties"
title11="Test 11: Internal offsets and code size tests"
title12="Test 12: JIT-specific features (JIT available)"
title13="Test 13: JIT-specific features (JIT not available)"
title12="Test 12: JIT-specific features (when JIT is available)"
title13="Test 13: JIT-specific features (when JIT is not available)"
title14="Test 14: Specials for the basic 8-bit library"
title15="Test 15: Specials for the 8-bit library with UTF-8 support"
title16="Test 16: Specials for the 8-bit library with Unicode propery support"
......@@ -350,79 +354,6 @@ if [ $jit -ne 0 -a "$nojit" != "yes" ] ; then
jitopt=-s+
fi
# Handle any explicit skips
for i in $skip; do eval do$i=no; done
# If any unsuitable tests were explicitly requested, grumble.
if [ $utf -eq 0 ] ; then
if [ $do4 = yes ] ; then
echo "Can't run test 4 because UTF support is not configured"
exit 1
fi
if [ $do5 = yes ] ; then
echo "Can't run test 5 because UTF support is not configured"
exit 1
fi
if [ $do9 = yes ] ; then
echo "Can't run test 8 because UTF support is not configured"
exit 1
fi
if [ $do15 = yes ] ; then
echo "Can't run test 15 because UTF support is not configured"
exit 1
fi
if [ $do18 = yes ] ; then
echo "Can't run test 18 because UTF support is not configured"
fi
if [ $do22 = yes ] ; then
echo "Can't run test 22 because UTF support is not configured"
fi
fi
if [ $ucp -eq 0 ] ; then
if [ $do6 = yes ] ; then
echo "Can't run test 6 because Unicode property support is not configured"
exit 1
fi
if [ $do7 = yes ] ; then
echo "Can't run test 7 because Unicode property support is not configured"
exit 1
fi
if [ $do10 = yes ] ; then
echo "Can't run test 10 because Unicode property support is not configured"
exit 1
fi
if [ $do16 = yes ] ; then
echo "Can't run test 16 because Unicode property support is not configured"
exit 1
fi
if [ $do19 = yes ] ; then
echo "Can't run test 19 because Unicode property support is not configured"
exit 1
fi
fi
if [ $link_size -ne 2 ] ; then
if [ $do11 = yes ] ; then
echo "Can't run test 11 because the link size ($link_size) is not 2"
exit 1
fi
fi
if [ $jit -eq 0 ] ; then
if [ $do12 = "yes" ] ; then
echo "Can't run test 12 because JIT support is not configured"
exit 1
fi
else
if [ $do13 = "yes" ] ; then
echo "Can't run test 13 because JIT support is configured"
exit 1
fi
fi
# If no specific tests were requested, select all. Those that are not
# relevant will be automatically skipped.
......@@ -461,8 +392,8 @@ if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \
do26=yes
fi
# Handle any explicit skips (again, so that an argument list may consist only
# of explicit skips).
# Handle any explicit skips at this stage, so that an argument list may consist
# only of explicit skips.
for i in $skip; do eval do$i=no; done
......
......@@ -46,6 +46,7 @@
#define NEWLINE @NEWLINE@
#define POSIX_MALLOC_THRESHOLD @PCRE_POSIX_MALLOC_THRESHOLD@
#define LINK_SIZE @PCRE_LINK_SIZE@
#define PARENS_NEST_LIMIT @PCRE_PARENS_NEST_LIMIT@
#define MATCH_LIMIT @PCRE_MATCH_LIMIT@
#define MATCH_LIMIT_RECURSION @PCRE_MATCH_LIMIT_RECURSION@
#define PCREGREP_BUFSIZE @PCREGREP_BUFSIZE@
......
......@@ -9,17 +9,17 @@ dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might
dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
m4_define(pcre_minor, [33])
m4_define(pcre_minor, [34])
m4_define(pcre_prerelease, [])
m4_define(pcre_date, [2013-05-28])
m4_define(pcre_date, [2013-12-15])
# NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved.
# Libtool shared library interface versions (current:revision:age)
m4_define(libpcre_version, [3:1:2])
m4_define(libpcre16_version, [2:1:2])
m4_define(libpcre32_version, [0:1:0])
m4_define(libpcre_version, [3:2:2])
m4_define(libpcre16_version, [2:2:2])
m4_define(libpcre32_version, [0:2:0])
m4_define(libpcreposix_version, [0:2:0])
m4_define(libpcrecpp_version, [0:0:0])
......@@ -275,6 +275,12 @@ AC_ARG_WITH(link-size,
[internal link size (2, 3, or 4 allowed; default=2)]),
, with_link_size=2)
# Handle --with-parens-nest-limit=N
AC_ARG_WITH(parens-nest-limit,
AS_HELP_STRING([--with-parens-nest-limit=N],
[nested parentheses limit (default=250)]),
, with_parens_nest_limit=250)
# Handle --with-match-limit=N
AC_ARG_WITH(match-limit,
AS_HELP_STRING([--with-match-limit=N],
......@@ -784,6 +790,11 @@ AC_DEFINE_UNQUOTED([POSIX_MALLOC_THRESHOLD], [$with_posix_malloc_threshold], [
faster than using malloc() for each call. The threshold above which
the stack is no longer used is defined by POSIX_MALLOC_THRESHOLD.])
AC_DEFINE_UNQUOTED([PARENS_NEST_LIMIT], [$with_parens_nest_limit], [
The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
parentheses (of any kind) in a pattern. This limits the amount of system
stack that is used while compiling a pattern.])
AC_DEFINE_UNQUOTED([MATCH_LIMIT], [$with_match_limit], [
The value of MATCH_LIMIT determines the default number of times the
internal match() function can be called during a single execution of
......@@ -957,7 +968,7 @@ if test "$enable_pcretest_libreadline" = "yes"; then
fi
fi
# Check for valgrind
# Handle valgrind support
if test "$enable_valgrind" = "yes"; then
m4_ifdef([PKG_CHECK_MODULES],
......@@ -965,7 +976,7 @@ if test "$enable_valgrind" = "yes"; then
[AC_MSG_ERROR([pkg-config not supported])])
fi
# test code coverage reporting
# Handle code coverage reporting support
if test "$enable_coverage" = "yes"; then
if test "x$GCC" != "xyes"; then
AC_MSG_ERROR([Code coverage reports can only be generated when using GCC])
......@@ -996,11 +1007,7 @@ if test "$enable_coverage" = "yes"; then
AC_MSG_ERROR([genhtml not found])
fi
AC_DEFINE([SUPPORT_GCOV],[1], [
Define to allow pcretest and pcregrep to be linked with gcov, so that they
are able to generate code coverage reports.])
# And add flags needed for gcov
# Set flags needed for gcov
GCOV_CFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
GCOV_CXXFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
GCOV_LIBS="-lgcov"
......@@ -1075,6 +1082,7 @@ $PACKAGE-$VERSION configuration summary:
Use stack recursion ............. : ${enable_stack_for_recursion}
POSIX mem threshold ............. : ${with_posix_malloc_threshold}
Internal link size .............. : ${with_link_size}
Nested parentheses limit ........ : ${with_parens_nest_limit}
Match limit ..................... : ${with_match_limit}
Match limit recursion ........... : ${with_match_limit_recursion}
Build shared libs ............... : ${enable_shared}
......
......@@ -171,8 +171,8 @@ can skip ahead to the CMake section.
pcre16_version.c
pcre16_xclass.c
(8) If you want to build a 16-bit library (as well as, or instead of the 8-bit
or 32-bit libraries) repeat steps 5-6 with the following files:
(8) If you want to build a 32-bit library (as well as, or instead of the 8-bit
or 16-bit libraries) repeat steps 5-6 with the following files:
pcre32_byte_order.c
pcre32_chartables.c
......
......@@ -9,8 +9,10 @@ from:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip
There is a mailing list for discussion about the development of PCRE at
pcre-dev@exim.org. You can access the archives and subscribe or manage your
subscription here:
pcre-dev@exim.org
https://lists.exim.org/mailman/listinfo/pcre-dev
Please read the NEWS file if you are upgrading from a previous release.
The contents of this README file are:
......@@ -112,6 +114,11 @@ contributions provided support for compiling PCRE on various flavours of
Windows (I myself do not use Windows). Nowadays there is more Windows support
in the standard distribution, so these contibutions have been archived.
A PCRE user maintains downloadable Windows binaries of the pcregrep and
pcretest programs here:
http://www.rexegg.com/pcregrep-pcretest.html
Building PCRE on non-Unix-like systems
--------------------------------------
......@@ -262,9 +269,17 @@ library. They are also documented in the pcrebuild man page.
on the "configure" command.
. PCRE has a counter that can be set to limit the amount of resources it uses.
If the limit is exceeded during a match, the match fails. The default is ten
million. You can change the default by setting, for example,
. PCRE has a counter that limits the depth of nesting of parentheses in a
pattern. This limits the amount of system stack that a pattern uses when it
is compiled. The default is 250, but you can change it by setting, for
example,
--with-parens-nest-limit=500
. PCRE has a counter that can be set to limit the amount of resources it uses
when matching a pattern. If the limit is exceeded during a match, the match
fails. The default is ten million. You can change the default by setting, for
example,
--with-match-limit=500000
......@@ -344,7 +359,8 @@ library. They are also documented in the pcrebuild man page.
report is generated by running "make coverage". If ccache is installed on
your system, it must be disabled when building PCRE for coverage reporting.
You can do this by setting the environment variable CCACHE_DISABLE=1 before
running "make" to build PCRE.
running "make" to build PCRE. There is more information about coverage
reporting in the "pcrebuild" documentation.
. The pcregrep program currently supports only 8-bit data files, and so
requires the 8-bit PCRE library. It is possible to compile pcregrep to use
......@@ -971,4 +987,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
Last updated: 28 April 2013
Last updated: 05 November 2013
......@@ -23,8 +23,8 @@ man page, in case the conversion went wrong.
<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
<P>
<b>pcre-config [--prefix] [--exec-prefix] [--version] [--libs]</b>
<b>[--libs16] [--libs32] [--libs-cpp] [--libs-posix]</b>
<b>[--cflags] [--cflags-posix]</b>
<b> [--libs16] [--libs32] [--libs-cpp] [--libs-posix]</b>
<b> [--cflags] [--cflags-posix]</b>
</P>
<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
<P>
......
......@@ -62,7 +62,7 @@ The current implementation of PCRE corresponds approximately with Perl 5.12,
including support for UTF-8/16/32 encoded strings and Unicode general category
properties. However, UTF-8/16/32 and Unicode support has to be explicitly
enabled; it is not the default. The Unicode tables correspond to Unicode
release 6.2.0.
release 6.3.0.
</P>
<P>
In addition to the Perl-compatible matching function, PCRE contains an
......
......@@ -42,126 +42,126 @@ man page, in case the conversion went wrong.
<br><a name="SEC1" href="#TOC1">PCRE 16-BIT API BASIC FUNCTIONS</a><br>
<P>
<b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
<b>int *<i>errorcodeptr</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> int *<i>errorcodeptr</i>,</b>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>);</b>
<br>
<br>
<b>void pcre16_free_study(pcre16_extra *<i>extra</i>);</b>
</P>
<P>
<br>
<br>
<b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
<br>
<br>
<b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
</P>
<br><a name="SEC2" href="#TOC1">PCRE 16-BIT API STRING EXTRACTION FUNCTIONS</a><br>
<P>
<b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b>PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b> PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
<b>int <i>buffersize</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
<b> int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>name</i>);</b>
</P>
<P>
<b>" PCRE_SPTR16 <i>name</i>);</b>
<br>
<br>
<b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
<br>
<br>
<b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b>
<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
</P>
<P>
<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
<br>
<br>
<b>void pcre16_free_substring(PCRE_SPTR16 <i>stringptr</i>);</b>
</P>
<P>
<br>
<br>
<b>void pcre16_free_substring_list(PCRE_SPTR16 *<i>stringptr</i>);</b>
</P>
<br><a name="SEC3" href="#TOC1">PCRE 16-BIT API AUXILIARY FUNCTIONS</a><br>
<P>
<b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b>
</P>
<P>
<br>
<br>
<b>void pcre16_jit_stack_free(pcre16_jit_stack *<i>stack</i>);</b>
</P>
<P>
<br>
<br>
<b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b>
<b>pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
</P>
<P>
<b> pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
<br>
<br>
<b>const unsigned char *pcre16_maketables(void);</b>
</P>
<P>
<br>
<br>
<b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
<b>int <i>what</i>, void *<i>where</i>);</b>
</P>
<P>
<b> int <i>what</i>, void *<i>where</i>);</b>
<br>
<br>
<b>int pcre16_refcount(pcre16 *<i>code</i>, int <i>adjust</i>);</b>
</P>
<P>
<br>
<br>
<b>int pcre16_config(int <i>what</i>, void *<i>where</i>);</b>
</P>
<P>
<br>
<br>
<b>const char *pcre16_version(void);</b>
</P>
<P>
<br>
<br>
<b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b>
<b>pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
<b> pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
</P>
<br><a name="SEC4" href="#TOC1">PCRE 16-BIT API INDIRECTED FUNCTIONS</a><br>
<P>
<b>void *(*pcre16_malloc)(size_t);</b>
</P>
<P>
<br>
<br>
<b>void (*pcre16_free)(void *);</b>
</P>
<P>
<br>
<br>
<b>void *(*pcre16_stack_malloc)(size_t);</b>
</P>
<P>
<br>
<br>
<b>void (*pcre16_stack_free)(void *);</b>
</P>
<P>
<br>
<br>
<b>int (*pcre16_callout)(pcre16_callout_block *);</b>
</P>
<br><a name="SEC5" href="#TOC1">PCRE 16-BIT API 16-BIT-ONLY FUNCTION</a><br>
<P>
<b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b>
<b>PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b>
<b>int <i>keep_boms</i>);</b>
<b> PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b>
<b> int <i>keep_boms</i>);</b>
</P>
<br><a name="SEC6" href="#TOC1">THE PCRE 16-BIT LIBRARY</a><br>
<P>
......
......@@ -42,126 +42,125 @@ man page, in case the conversion went wrong.
<br><a name="SEC1" href="#TOC1">PCRE 32-BIT API BASIC FUNCTIONS</a><br>
<P>
<b>pcre32 *pcre32_compile(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre32 *pcre32_compile2(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
<b>int *<i>errorcodeptr</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> int *<i>errorcodeptr</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre32_extra *pcre32_study(const pcre32 *<i>code</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>);</b>
<br>
<br>
<b>void pcre32_free_study(pcre32_extra *<i>extra</i>);</b>
</P>
<P>
<br>
<br>
<b>int pcre32_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
</P>
<P>
<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
<br>
<br>
<b>int pcre32_dfa_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
</P>
<br><a name="SEC2" href="#TOC1">PCRE 32-BIT API STRING EXTRACTION FUNCTIONS</a><br>
<P>
<b>int pcre32_copy_named_substring(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b>PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b>
</P>
<P>
<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b> PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre32_copy_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b>
<b>int <i>buffersize</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b>
<b> int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre32_get_named_substring(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b>PCRE_SPTR32 *<i>stringptr</i>);</b>
</P>
<P>
<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre32_get_stringnumber(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>name</i>);</b>
</P>
<P>
<b> PCRE_SPTR32 <i>name</i>);</b>
<br>
<br>
<b>int pcre32_get_stringtable_entries(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b>
</P>
<P>
<b> PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b>
<br>
<br>
<b>int pcre32_get_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b>PCRE_SPTR32 *<i>stringptr</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre32_get_substring_list(PCRE_SPTR32 <i>subject</i>,</b>
<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b>
</P>
<P>
<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b>
<br>
<br>
<b>void pcre32_free_substring(PCRE_SPTR32 <i>stringptr</i>);</b>
</P>
<P>
<br>
<br>
<b>void pcre32_free_substring_list(PCRE_SPTR32 *<i>stringptr</i>);</b>
</P>
<br><a name="SEC3" href="#TOC1">PCRE 32-BIT API AUXILIARY FUNCTIONS</a><br>
<P>
<b>pcre32_jit_stack *pcre32_jit_stack_alloc(int <i>startsize</i>, int <i>maxsize</i>);</b>
</P>
<P>
<br>
<br>
<b>void pcre32_jit_stack_free(pcre32_jit_stack *<i>stack</i>);</b>
</P>
<P>
<br>
<br>
<b>void pcre32_assign_jit_stack(pcre32_extra *<i>extra</i>,</b>
<b>pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b>
</P>
<P>
<b> pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b>
<br>
<br>
<b>const unsigned char *pcre32_maketables(void);</b>
</P>
<P>
<br>
<br>
<b>int pcre32_fullinfo(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
<b>int <i>what</i>, void *<i>where</i>);</b>
</P>
<P>
<b> int <i>what</i>, void *<i>where</i>);</b>
<br>
<br>
<b>int pcre32_refcount(pcre32 *<i>code</i>, int <i>adjust</i>);</b>
</P>
<P>
<br>
<br>
<b>int pcre32_config(int <i>what</i>, void *<i>where</i>);</b>
</P>
<P>
<br>
<br>
<b>const char *pcre32_version(void);</b>
</P>
<P>
<br>
<br>
<b>int pcre32_pattern_to_host_byte_order(pcre32 *<i>code</i>,</b>
<b>pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
<b> pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
</P>
<br><a name="SEC4" href="#TOC1">PCRE 32-BIT API INDIRECTED FUNCTIONS</a><br>
<P>
<b>void *(*pcre32_malloc)(size_t);</b>
</P>
<P>
<br>
<br>
<b>void (*pcre32_free)(void *);</b>
</P>
<P>
<br>
<br>
<b>void *(*pcre32_stack_malloc)(size_t);</b>
</P>
<P>
<br>
<br>
<b>void (*pcre32_stack_free)(void *);</b>
</P>
<P>
<br>
<br>
<b>int (*pcre32_callout)(pcre32_callout_block *);</b>
</P>
<br><a name="SEC5" href="#TOC1">PCRE 32-BIT API 32-BIT-ONLY FUNCTION</a><br>
<P>
<b>int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *<i>output</i>,</b>
<b>PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b>
<b>int <i>keep_boms</i>);</b>
<b> PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>byte_order</i>,</b>
<b> int <i>keep_boms</i>);</b>
</P>
<br><a name="SEC6" href="#TOC1">THE PCRE 32-BIT LIBRARY</a><br>
<P>
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>void pcre_assign_jit_stack(pcre_extra *<i>extra</i>,</b>
<b>pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b>
</P>
<P>
<b> pcre_jit_callback <i>callback</i>, void *<i>data</i>);</b>
<br>
<br>
<b>void pcre16_assign_jit_stack(pcre16_extra *<i>extra</i>,</b>
<b>pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
</P>
<P>
<b> pcre16_jit_callback <i>callback</i>, void *<i>data</i>);</b>
<br>
<br>
<b>void pcre32_assign_jit_stack(pcre32_extra *<i>extra</i>,</b>
<b>pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b>
<b> pcre32_jit_callback <i>callback</i>, void *<i>data</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,18 +20,18 @@ SYNOPSIS
</P>
<P>
<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre32 *pcre32_compile(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
</P>
<br><b>
DESCRIPTION
......@@ -65,6 +65,7 @@ The option bits are:
PCRE_FIRSTLINE Force matching to be before newline
PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
PCRE_MULTILINE ^ and $ match newlines within data
PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
sequences
......@@ -73,6 +74,8 @@ The option bits are:
PCRE_NEWLINE_LF Set LF as the newline sequence
PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
theses (named ones available)
PCRE_NO_AUTO_POSSESS Disable auto-possessification
PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
validity (only relevant if
PCRE_UTF16 is set)
......
......@@ -20,21 +20,21 @@ SYNOPSIS
</P>
<P>
<b>pcre *pcre_compile2(const char *<i>pattern</i>, int <i>options</i>,</b>
<b>int *<i>errorcodeptr</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> int *<i>errorcodeptr</i>,</b>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre16 *pcre16_compile2(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
<b>int *<i>errorcodeptr</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
</P>
<P>
<b> int *<i>errorcodeptr</i>,</b>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
<br>
<br>
<b>pcre32 *pcre32_compile2(PCRE_SPTR32 <i>pattern</i>, int <i>options</i>,</b>
<b>int *<i>errorcodeptr</i>,</b>
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b>const unsigned char *<i>tableptr</i>);</b>
<b>" int *<i>errorcodeptr</i></b>
<b> const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
<b> const unsigned char *<i>tableptr</i>);</b>
</P>
<br><b>
DESCRIPTION
......@@ -69,6 +69,7 @@ The option bits are:
PCRE_FIRSTLINE Force matching to be before newline
PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
PCRE_MULTILINE ^ and $ match newlines within data
PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
sequences
......@@ -77,6 +78,8 @@ The option bits are:
PCRE_NEWLINE_LF Set LF as the newline sequence
PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
theses (named ones available)
PCRE_NO_AUTO_POSSESS Disable auto-possessification
PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
validity (only relevant if
PCRE_UTF16 is set)
......
......@@ -48,6 +48,7 @@ point to an unsigned long integer. The available codes are:
target architecture for the JIT compiler,
or NULL if there is no JIT support
PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
PCRE_CONFIG_PARENS_LIMIT Parentheses nesting limit
PCRE_CONFIG_MATCH_LIMIT Internal resource limit
PCRE_CONFIG_MATCH_LIMIT_RECURSION
Internal recursion depth limit
......
......@@ -20,21 +20,21 @@ SYNOPSIS
</P>
<P>
<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
<b>char *<i>buffer</i>, int <i>buffersize</i>);</b>
</P>
<P>
<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
<b> char *<i>buffer</i>, int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre16_copy_named_substring(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b>PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b> PCRE_UCHAR16 *<i>buffer</i>, int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre32_copy_named_substring(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b>PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b>
<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b> PCRE_UCHAR32 *<i>buffer</i>, int <i>buffersize</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,18 +20,18 @@ SYNOPSIS
</P>
<P>
<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
<b>int <i>buffersize</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
<b> int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre16_copy_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
<b>int <i>buffersize</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR16 *<i>buffer</i>,</b>
<b> int <i>buffersize</i>);</b>
<br>
<br>
<b>int pcre32_copy_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b>
<b>int <i>buffersize</i>);</b>
<b> int <i>stringcount</i>, int <i>stringnumber</i>, PCRE_UCHAR32 *<i>buffer</i>,</b>
<b> int <i>buffersize</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,21 +20,21 @@ SYNOPSIS
</P>
<P>
<b>int pcre_dfa_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
</P>
<P>
<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
<br>
<br>
<b>int pcre16_dfa_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
<br>
<br>
<b>int pcre32_dfa_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>int *<i>workspace</i>, int <i>wscount</i>);</b>
<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> int *<i>workspace</i>, int <i>wscount</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,18 +20,18 @@ SYNOPSIS
</P>
<P>
<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
</P>
<P>
<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
<br>
<br>
<b>int pcre16_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
<br>
<br>
<b>int pcre32_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
<b>int <i>what</i>, void *<i>where</i>);</b>
</P>
<P>
<b> int <i>what</i>, void *<i>where</i>);</b>
<br>
<br>
<b>int pcre16_fullinfo(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
<b>int <i>what</i>, void *<i>where</i>);</b>
</P>
<P>
<b> int <i>what</i>, void *<i>where</i>);</b>
<br>
<br>
<b>int pcre32_fullinfo(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
<b>int <i>what</i>, void *<i>where</i>);</b>
<b> int <i>what</i>, void *<i>where</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,21 +20,21 @@ SYNOPSIS
</P>
<P>
<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
<b>const char **<i>stringptr</i>);</b>
</P>
<P>
<b> const char *<i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, const char *<i>stringname</i>,</b>
<b> const char **<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre16_get_named_substring(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR16 <i>stringname</i>,</b>
<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre32_get_named_substring(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b>PCRE_SPTR32 *<i>stringptr</i>);</b>
<b> PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b> int <i>stringcount</i>, PCRE_SPTR32 <i>stringname</i>,</b>
<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
<b>const char *<i>name</i>);</b>
</P>
<P>
<b> const char *<i>name</i>);</b>
<br>
<br>
<b>int pcre16_get_stringnumber(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>name</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>name</i>);</b>
<br>
<br>
<b>int pcre32_get_stringnumber(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>name</i>);</b>
<b> PCRE_SPTR32 <i>name</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>int pcre_get_stringtable_entries(const pcre *<i>code</i>,</b>
<b>const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
</P>
<P>
<b> const char *<i>name</i>, char **<i>first</i>, char **<i>last</i>);</b>
<br>
<br>
<b>int pcre16_get_stringtable_entries(const pcre16 *<i>code</i>,</b>
<b>PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>name</i>, PCRE_UCHAR16 **<i>first</i>, PCRE_UCHAR16 **<i>last</i>);</b>
<br>
<br>
<b>int pcre32_get_stringtable_entries(const pcre32 *<i>code</i>,</b>
<b>PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b>
<b> PCRE_SPTR32 <i>name</i>, PCRE_UCHAR32 **<i>first</i>, PCRE_UCHAR32 **<i>last</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,18 +20,18 @@ SYNOPSIS
</P>
<P>
<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b>const char **<i>stringptr</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b> const char **<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre16_get_substring(PCRE_SPTR16 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b>PCRE_SPTR16 *<i>stringptr</i>);</b>
</P>
<P>
<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b> PCRE_SPTR16 *<i>stringptr</i>);</b>
<br>
<br>
<b>int pcre32_get_substring(PCRE_SPTR32 <i>subject</i>, int *<i>ovector</i>,</b>
<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b>PCRE_SPTR32 *<i>stringptr</i>);</b>
<b> int <i>stringcount</i>, int <i>stringnumber</i>,</b>
<b> PCRE_SPTR32 *<i>stringptr</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
</P>
<P>
<b> int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
<br>
<br>
<b>int pcre16_get_substring_list(PCRE_SPTR16 <i>subject</i>,</b>
<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
</P>
<P>
<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR16 **<i>listptr</i>);</b>
<br>
<br>
<b>int pcre32_get_substring_list(PCRE_SPTR32 <i>subject</i>,</b>
<b>int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b>
<b> int *<i>ovector</i>, int <i>stringcount</i>, PCRE_SPTR32 **<i>listptr</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,21 +20,21 @@ SYNOPSIS
</P>
<P>
<b>int pcre_jit_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>pcre_jit_stack *<i>jstack</i>);</b>
</P>
<P>
<b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> pcre_jit_stack *<i>jstack</i>);</b>
<br>
<br>
<b>int pcre16_jit_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
<b>PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>pcre_jit_stack *<i>jstack</i>);</b>
</P>
<P>
<b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> pcre_jit_stack *<i>jstack</i>);</b>
<br>
<br>
<b>int pcre32_jit_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
<b>PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b>pcre_jit_stack *<i>jstack</i>);</b>
<b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
<b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
<b> pcre_jit_stack *<i>jstack</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>pcre_jit_stack *pcre_jit_stack_alloc(int <i>startsize</i>,</b>
<b>int <i>maxsize</i>);</b>
</P>
<P>
<b> int <i>maxsize</i>);</b>
<br>
<br>
<b>pcre16_jit_stack *pcre16_jit_stack_alloc(int <i>startsize</i>,</b>
<b>int <i>maxsize</i>);</b>
</P>
<P>
<b> int <i>maxsize</i>);</b>
<br>
<br>
<b>pcre32_jit_stack *pcre32_jit_stack_alloc(int <i>startsize</i>,</b>
<b>int <i>maxsize</i>);</b>
<b> int <i>maxsize</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>int pcre_pattern_to_host_byte_order(pcre *<i>code</i>,</b>
<b>pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
</P>
<P>
<b> pcre_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
<br>
<br>
<b>int pcre16_pattern_to_host_byte_order(pcre16 *<i>code</i>,</b>
<b>pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
</P>
<P>
<b> pcre16_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
<br>
<br>
<b>int pcre32_pattern_to_host_byte_order(pcre32 *<i>code</i>,</b>
<b>pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
<b> pcre32_extra *<i>extra</i>, const unsigned char *<i>tables</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,15 +20,15 @@ SYNOPSIS
</P>
<P>
<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>);</b>
<br>
<br>
<b>pcre16_extra *pcre16_study(const pcre16 *<i>code</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>);</b>
</P>
<P>
<b> const char **<i>errptr</i>);</b>
<br>
<br>
<b>pcre32_extra *pcre32_study(const pcre32 *<i>code</i>, int <i>options</i>,</b>
<b>const char **<i>errptr</i>);</b>
<b> const char **<i>errptr</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,8 +20,8 @@ SYNOPSIS
</P>
<P>
<b>int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *<i>output</i>,</b>
<b>PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b>
<b>int <i>keep_boms</i>);</b>
<b> PCRE_SPTR16 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b>
<b> int <i>keep_boms</i>);</b>
</P>
<br><b>
DESCRIPTION
......
......@@ -20,8 +20,8 @@ SYNOPSIS
</P>
<P>
<b>int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *<i>output</i>,</b>
<b>PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b>
<b>int <i>keep_boms</i>);</b>
<b> PCRE_SPTR32 <i>input</i>, int <i>length</i>, int *<i>host_byte_order</i>,</b>
<b> int <i>keep_boms</i>);</b>
</P>
<br><b>
DESCRIPTION
......
This diff is collapsed.
......@@ -77,15 +77,50 @@ independent groups).
Automatic callouts can be used for tracking the progress of pattern matching.
The
<a href="pcretest.html"><b>pcretest</b></a>
command has an option that sets automatic callouts; when it is used, the output
indicates how the pattern is matched. This is useful information when you are
trying to optimize the performance of a particular pattern.
program has a pattern qualifier (/C) that sets automatic callouts; when it is
used, the output indicates how the pattern is being matched. This is useful
information when you are trying to optimize the performance of a particular
pattern.
</P>
<br><a name="SEC3" href="#TOC1">MISSING CALLOUTS</a><br>
<P>
You should be aware that, because of optimizations in the way PCRE matches
patterns by default, callouts sometimes do not happen. For example, if the
pattern is
You should be aware that, because of optimizations in the way PCRE compiles and
matches patterns, callouts sometimes do not happen exactly as you might expect.
</P>
<P>
At compile time, PCRE "auto-possessifies" repeated items when it knows that
what follows cannot be part of the repeat. For example, a+[bc] is compiled as
if it were a++[bc]. The <b>pcretest</b> output when this pattern is anchored and
then applied with automatic callouts to the string "aaaa" is:
<pre>
---&#62;aaaa
+0 ^ ^
+1 ^ a+
+3 ^ ^ [bc]
No match
</pre>
This indicates that when matching [bc] fails, there is no backtracking into a+
and therefore the callouts that would be taken for the backtracks do not occur.
You can disable the auto-possessify feature by passing PCRE_NO_AUTO_POSSESS
to <b>pcre_compile()</b>, or starting the pattern with (*NO_AUTO_POSSESS). If
this is done in <b>pcretest</b> (using the /O qualifier), the output changes to
this:
<pre>
---&#62;aaaa
+0 ^ ^
+1 ^ a+
+3 ^ ^ [bc]
+3 ^ ^ [bc]
+3 ^ ^ [bc]
+3 ^^ [bc]
No match
</pre>
This time, when matching [bc] fails, the matcher backtracks into a+ and tries
again, repeatedly, until a+ itself fails.
</P>
<P>
Other optimizations that provide fast "no match" results also affect callouts.
For example, if the pattern is
<pre>
ab(?C4)cd
</pre>
......@@ -109,11 +144,11 @@ callouts such as the example above are obeyed.
<br><a name="SEC4" href="#TOC1">THE CALLOUT INTERFACE</a><br>
<P>
During matching, when PCRE reaches a callout point, the external function
defined by <i>pcre_callout</i> or <i>pcre[16|32]_callout</i> is called
(if it is set). This applies to both normal and DFA matching. The only
argument to the callout function is a pointer to a <b>pcre_callout</b>
or <b>pcre[16|32]_callout</b> block.
These structures contains the following fields:
defined by <i>pcre_callout</i> or <i>pcre[16|32]_callout</i> is called (if it is
set). This applies to both normal and DFA matching. The only argument to the
callout function is a pointer to a <b>pcre_callout</b> or
<b>pcre[16|32]_callout</b> block. These structures contains the following
fields:
<pre>
int <i>version</i>;
int <i>callout_number</i>;
......@@ -242,7 +277,7 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC7" href="#TOC1">REVISION</a><br>
<P>
Last updated: 03 March 2013
Last updated: 12 November 2013
<br>
Copyright &copy; 1997-2013 University of Cambridge.
<br>
......
......@@ -138,18 +138,24 @@ an error is given at compile time.
<P>
15. Perl recognizes comments in some places that PCRE does not, for example,
between the ( and ? at the start of a subpattern. If the /x modifier is set,
Perl allows white space between ( and ? but PCRE never does, even if the
PCRE_EXTENDED option is set.
Perl allows white space between ( and ? (though current Perls warn that this is
deprecated) but PCRE never does, even if the PCRE_EXTENDED option is set.
</P>
<P>
16. In PCRE, the upper/lower case character properties Lu and Ll are not
16. Perl, when in warning mode, gives warnings for character classes such as
[A-\d] or [a-[:digit:]]. It then treats the hyphens as literals. PCRE has no
warning features, so it gives an error in these cases because they are almost
certainly user mistakes.
</P>
<P>
17. In PCRE, the upper/lower case character properties Lu and Ll are not
affected when case-independent matching is specified. For example, \p{Lu}
always matches an upper case letter. I think Perl has changed in this respect;
in the release at the time of writing (5.16), \p{Lu} and \p{Ll} match all
letters, regardless of case, when case independence is specified.
</P>
<P>
17. PCRE provides some extensions to the Perl regular expression facilities.
18. PCRE provides some extensions to the Perl regular expression facilities.
Perl 5.10 includes new features that are not in earlier versions of Perl, some
of which (such as named parentheses) have been in PCRE for some time. This list
is with respect to Perl 5.10:
......@@ -220,7 +226,7 @@ Cambridge CB2 3QH, England.
REVISION
</b><br>
<P>
Last updated: 19 March 2013
Last updated: 10 November 2013
<br>
Copyright &copy; 1997-2013 University of Cambridge.
<br>
......
......@@ -21,9 +21,10 @@ practice be relevant.
</P>
<P>
The maximum length of a compiled pattern is approximately 64K data units (bytes
for the 8-bit library, 32-bit units for the 32-bit library, and 32-bit units for
the 32-bit library) if PCRE is compiled with the default internal linkage size
of 2 bytes. If you want to process regular expressions that are truly enormous,
for the 8-bit library, 16-bit units for the 16-bit library, and 32-bit units for
the 32-bit library) if PCRE is compiled with the default internal linkage size,
which is 2 bytes for the 8-bit and 16-bit libraries, and 4 bytes for the 32-bit
library. If you want to process regular expressions that are truly enormous,
you can compile PCRE with an internal linkage size of 3 or 4 (when building the
16-bit or 32-bit library, 3 is rounded up to 4). See the <b>README</b> file in
the source distribution and the
......@@ -36,7 +37,10 @@ All values in repeating quantifiers must be less than 65536.
</P>
<P>
There is no limit to the number of parenthesized subpatterns, but there can be
no more than 65535 capturing subpatterns.
no more than 65535 capturing subpatterns. There is, however, a limit to the
depth of nesting of parenthesized subpatterns of all kinds. This is imposed in
order to limit the amount of system stack used at compile time. The limit can
be specified when PCRE is built; the default is 250.
</P>
<P>
There is a limit to the number of forward references to subsequent subpatterns
......@@ -50,7 +54,7 @@ maximum number of named subpatterns is 10000.
</P>
<P>
The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or (*THEN) verb
is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit library.
is 255 for the 8-bit library and 65535 for the 16-bit and 32-bit libraries.
</P>
<P>
The maximum length of a subject string is the largest positive number that an
......@@ -77,9 +81,9 @@ Cambridge CB2 3QH, England.
REVISION
</b><br>
<P>
Last updated: 04 May 2012
Last updated: 05 November 2013
<br>
Copyright &copy; 1997-2012 University of Cambridge.
Copyright &copy; 1997-2013 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE index page</a>.
......
......@@ -126,6 +126,15 @@ character of the subject. The algorithm does not automatically move on to find
matches that start at later positions.
</P>
<P>
PCRE's "auto-possessification" optimization usually applies to character
repeats at the end of a pattern (as well as internally). For example, the
pattern "a\d+" is compiled as if it were "a\d++" because there is no point
even considering the possibility of backtracking into the repeated digits. For
DFA matching, this means that only one possible match is found. If you really
do want multiple matches in such cases, either use an ungreedy repeat
("a\d+?") or set the PCRE_NO_AUTO_POSSESS option when compiling.
</P>
<P>
There are a number of features of PCRE regular expressions that are not
supported by the alternative matching algorithm. They are as follows:
</P>
......@@ -224,7 +233,7 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC8" href="#TOC1">REVISION</a><br>
<P>
Last updated: 08 January 2012
Last updated: 12 November 2013
<br>
Copyright &copy; 1997-2012 University of Cambridge.
<br>
......
......@@ -306,6 +306,16 @@ not retain the previously partially-matched string. It is up to the calling
program to do that if it needs to.
</P>
<P>
That means that, for an unanchored pattern, if a continued match fails, it is
not possible to try again at a new starting point. All this facility is capable
of doing is continuing with the previous match attempt. In the previous
example, if the second set of data is "ug23" the result is no match, even
though there would be a match for "aug23" if the entire string were given at
once. Depending on the application, this may or may not be what you want.
The only way to allow for starting again at the next character is to retain the
matched part of the subject and try a new complete match.
</P>
<P>
You can set the PCRE_PARTIAL_SOFT or PCRE_PARTIAL_HARD options with
PCRE_DFA_RESTART to continue partial matching over multiple segments. This
facility can be used to pass very long subject strings to the DFA matching
......@@ -490,7 +500,7 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC11" href="#TOC1">REVISION</a><br>
<P>
Last updated: 20 February 2013
Last updated: 02 July 2013
<br>
Copyright &copy; 1997-2013 University of Cambridge.
<br>
......
This diff is collapsed.
......@@ -13,7 +13,7 @@ from the original man page. If there is any nonsense in it, please consult the
man page, in case the conversion went wrong.
<br>
<ul>
<li><a name="TOC1" href="#SEC1">SYNOPSIS OF POSIX API</a>
<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
<li><a name="TOC3" href="#SEC3">COMPILING A PATTERN</a>
<li><a name="TOC4" href="#SEC4">MATCHING NEWLINE CHARACTERS</a>
......@@ -23,23 +23,21 @@ man page, in case the conversion went wrong.
<li><a name="TOC8" href="#SEC8">AUTHOR</a>
<li><a name="TOC9" href="#SEC9">REVISION</a>
</ul>
<br><a name="SEC1" href="#TOC1">SYNOPSIS OF POSIX API</a><br>
<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
<P>
<b>#include &#60;pcreposix.h&#62;</b>
</P>
<P>
<b>int regcomp(regex_t *<i>preg</i>, const char *<i>pattern</i>,</b>
<b>int <i>cflags</i>);</b>
</P>
<P>
<b> int <i>cflags</i>);</b>
<br>
<br>
<b>int regexec(regex_t *<i>preg</i>, const char *<i>string</i>,</b>
<b>size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b>
</P>
<P>
<b>size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b>
<b>char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b>
</P>
<P>
<b> size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b>
<b> size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b>
<b> char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b>
<br>
<br>
<b>void regfree(regex_t *<i>preg</i>);</b>
</P>
<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
......
......@@ -102,8 +102,8 @@ study data.
<br><a name="SEC3" href="#TOC1">RE-USING A PRECOMPILED PATTERN</a><br>
<P>
Re-using a precompiled pattern is straightforward. Having reloaded it into main
memory, called <b>pcre[16|32]_pattern_to_host_byte_order()</b> if necessary,
you pass its pointer to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> in
memory, called <b>pcre[16|32]_pattern_to_host_byte_order()</b> if necessary, you
pass its pointer to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> in
the usual way.
</P>
<P>
......@@ -119,6 +119,11 @@ in the
documentation.
</P>
<P>
<b>Warning:</b> The tables that <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b> use
must be the same as those that were used when the pattern was compiled. If this
is not the case, the behaviour is undefined.
</P>
<P>
If you did not provide custom character tables when the pattern was compiled,
the pointer in the compiled pattern is NULL, which causes the matching
functions to use PCRE's internal tables. Thus, you do not need to take any
......@@ -126,9 +131,9 @@ special action at run time in this case.
</P>
<P>
If you saved study data with the compiled pattern, you need to create your own
<b>pcre[16|32]_extra</b> data block and set the <i>study_data</i> field to point to the
reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the
<i>flags</i> field to indicate that study data is present. Then pass the
<b>pcre[16|32]_extra</b> data block and set the <i>study_data</i> field to point
to the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in
the <i>flags</i> field to indicate that study data is present. Then pass the
<b>pcre[16|32]_extra</b> block to the matching function in the usual way. If the
pattern was studied for just-in-time optimization, that data cannot be saved,
and so is lost by a save/restore cycle.
......@@ -149,9 +154,9 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC6" href="#TOC1">REVISION</a><br>
<P>
Last updated: 24 June 2012
Last updated: 12 November 2013
<br>
Copyright &copy; 1997-2012 University of Cambridge.
Copyright &copy; 1997-2013 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE index page</a>.
......
......@@ -65,10 +65,14 @@ documentation. This document contains a quick-reference summary of the syntax.
\n newline (hex 0A)
\r carriage return (hex 0D)
\t tab (hex 09)
\0dd character with octal code 0dd
\ddd character with octal code ddd, or backreference
\o{ddd..} character with octal code ddd..
\xhh character with hex code hh
\x{hhh..} character with hex code hhh..
</PRE>
</pre>
Note that \0dd is always an octal code, and that \8 and \9 are the literal
characters "8" and "9".
</P>
<br><a name="SEC4" href="#TOC1">CHARACTER TYPES</a><br>
<P>
......@@ -92,9 +96,11 @@ documentation. This document contains a quick-reference summary of the syntax.
\W a "non-word" character
\X a Unicode extended grapheme cluster
</pre>
In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII
characters, even in a UTF mode. However, this can be changed by setting the
PCRE_UCP option.
By default, \d, \s, and \w match only ASCII characters, even in UTF-8 mode
or in the 16- bit and 32-bit libraries. However, if locale-specific matching is
happening, \s and \w may also match characters with code points in the range
128-255. If the PCRE_UCP option is set, the behaviour of these escape sequences
is changed to use Unicode properties and they match many more characters.
</P>
<br><a name="SEC5" href="#TOC1">GENERAL CATEGORY PROPERTIES FOR \p and \P</a><br>
<P>
......@@ -150,11 +156,13 @@ PCRE_UCP option.
<pre>
Xan Alphanumeric: union of properties L and N
Xps POSIX space: property Z or tab, NL, VT, FF, CR
Xsp Perl space: property Z or tab, NL, FF, CR
Xsp Perl space: property Z or tab, NL, VT, FF, CR
Xuc Univerally-named character: one that can be
represented by a Universal Character Name
Xwd Perl word: property Xan or underscore
</PRE>
</pre>
Perl and POSIX space are now the same. Perl added VT to its space character set
at release 5.18 and PCRE changed at release 8.34.
</P>
<br><a name="SEC7" href="#TOC1">SCRIPT NAMES FOR \p AND \P</a><br>
<P>
......@@ -385,7 +393,9 @@ newline-setting options with similar syntax:
(*UTF32) set UTF-32 mode: 32-bit library (PCRE_UTF32)
(*UTF) set appropriate UTF mode for the library in use
(*UCP) set PCRE_UCP (use Unicode properties for \d etc)
</PRE>
</pre>
Note that LIMIT_MATCH and LIMIT_RECURSION can only reduce the value of the
limits set by the caller of pcre_exec(), not increase them.
</P>
<br><a name="SEC17" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br>
<P>
......@@ -516,7 +526,7 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC27" href="#TOC1">REVISION</a><br>
<P>
Last updated: 26 April 2013
Last updated: 12 November 2013
<br>
Copyright &copy; 1997-2013 University of Cambridge.
<br>
......
......@@ -187,6 +187,11 @@ equivalent to adding <b>/M</b> to each regular expression. The size is given in
bytes for both libraries.
</P>
<P>
<b>-O</b>
Behave as if each pattern has the <b>/O</b> modifier, that is disable
auto-possessification for all patterns.
</P>
<P>
<b>-o</b> <i>osize</i>
Set the number of elements in the output vector that is used when calling
<b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b> to be <i>osize</i>. The
......@@ -256,19 +261,24 @@ should never be studied (see the <b>/S</b> pattern modifier below).
</P>
<P>
<b>-t</b>
Run each compile, study, and match many times with a timer, and output
resulting time per compile or match (in milliseconds). Do not set <b>-m</b> with
<b>-t</b>, because you will then get the size output a zillion times, and the
timing will be distorted. You can control the number of iterations that are
used for timing by following <b>-t</b> with a number (as a separate item on the
command line). For example, "-t 1000" would iterate 1000 times. The default is
to iterate 500000 times.
Run each compile, study, and match many times with a timer, and output the
resulting times per compile, study, or match (in milliseconds). Do not set
<b>-m</b> with <b>-t</b>, because you will then get the size output a zillion
times, and the timing will be distorted. You can control the number of
iterations that are used for timing by following <b>-t</b> with a number (as a
separate item on the command line). For example, "-t 1000" iterates 1000 times.
The default is to iterate 500000 times.
</P>
<P>
<b>-tm</b>
This is like <b>-t</b> except that it times only the matching phase, not the
compile or study phases.
</P>
<P>
<b>-T</b> <b>-TM</b>
These behave like <b>-t</b> and <b>-tm</b>, but in addition, at the end of a run,
the total times for all compiles, studies, and matches are output.
</P>
<br><a name="SEC5" href="#TOC1">DESCRIPTION</a><br>
<P>
If <b>pcretest</b> is given two filename arguments, it reads from the first and
......@@ -287,7 +297,7 @@ option states whether or not <b>readline()</b> will be used.
<P>
The program handles any number of sets of input on a single input file. Each
set starts with a regular expression, and continues with any number of data
lines to be matched against the pattern.
lines to be matched against that pattern.
</P>
<P>
Each data line is matched separately and independently. If you want to do
......@@ -361,6 +371,7 @@ sections.
<b>/M</b> show compiled memory size
<b>/m</b> set PCRE_MULTILINE
<b>/N</b> set PCRE_NO_AUTO_CAPTURE
<b>/O</b> set PCRE_NO_AUTO_POSSESS
<b>/P</b> use the POSIX wrapper
<b>/S</b> study the pattern after compilation
<b>/s</b> set PCRE_DOTALL
......@@ -419,6 +430,7 @@ options that do not correspond to anything in Perl:
<b>/f</b> PCRE_FIRSTLINE
<b>/J</b> PCRE_DUPNAMES
<b>/N</b> PCRE_NO_AUTO_CAPTURE
<b>/O</b> PCRE_NO_AUTO_POSSESS
<b>/U</b> PCRE_UNGREEDY
<b>/W</b> PCRE_UCP
<b>/X</b> PCRE_EXTRA
......@@ -562,8 +574,8 @@ matched. There are a number of qualifying characters that may follow <b>/S</b>.
They may appear in any order.
</P>
<P>
If <b>S</b> is followed by an exclamation mark, <b>pcre[16|32]_study()</b> is called
with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a
If <b>/S</b> is followed by an exclamation mark, <b>pcre[16|32]_study()</b> is
called with the PCRE_STUDY_EXTRA_NEEDED option, causing it always to return a
<b>pcre_extra</b> block, even when studying discovers no useful information.
</P>
<P>
......@@ -642,6 +654,37 @@ function:
The <b>/+</b> modifier works as described above. All other modifiers are
ignored.
</P>
<br><b>
Locking out certain modifiers
</b><br>
<P>
PCRE can be compiled with or without support for certain features such as
UTF-8/16/32 or Unicode properties. Accordingly, the standard tests are split up
into a number of different files that are selected for running depending on
which features are available. When updating the tests, it is all too easy to
put a new test into the wrong file by mistake; for example, to put a test that
requires UTF support into a file that is used when it is not available. To help
detect such mistakes as early as possible, there is a facility for locking out
specific modifiers. If an input line for <b>pcretest</b> starts with the string
"&#60; forbid " the following sequence of characters is taken as a list of
forbidden modifiers. For example, in the test files that must not use UTF or
Unicode property support, this line appears:
<pre>
&#60; forbid 8W
</pre>
This locks out the /8 and /W modifiers. An immediate error is given if they are
subsequently encountered. If the character string contains &#60; but not &#62;, all the
multi-character modifiers that begin with &#60; are locked out. Otherwise, such
modifiers must be explicitly listed, for example:
<pre>
&#60; forbid &#60;JS&#62;&#60;cr&#62;
</pre>
There must be a single space between &#60; and "forbid" for this feature to be
recognised. If there is not, the line is interpreted either as a request to
re-load a pre-compiled pattern (see "SAVING AND RELOADING COMPILED PATTERNS"
below) or, if there is a another &#60; character, as a pattern that uses &#60; as its
delimiter.
</P>
<br><a name="SEC7" href="#TOC1">DATA LINES</a><br>
<P>
Before each data line is passed to <b>pcre[16|32]_exec()</b>, leading and trailing
......@@ -662,6 +705,7 @@ recognized:
\v vertical tab (\x0b)
\nnn octal character (up to 3 octal digits); always
a byte unless &#62; 255 in UTF-8 or 16-bit or 32-bit mode
\o{dd...} octal character (any number of octal digits}
\xhh hexadecimal byte (up to 2 hex digits)
\x{hh...} hexadecimal character (any number of hex digits)
\A pass the PCRE_ANCHORED option to <b>pcre[16|32]_exec()</b> or <b>pcre[16|32]_dfa_exec()</b>
......@@ -1031,10 +1075,9 @@ writing the file, <b>pcretest</b> expects to read a new pattern.
</P>
<P>
A saved pattern can be reloaded into <b>pcretest</b> by specifying &#60; and a file
name instead of a pattern. The name of the file must not contain a &#60; character,
as otherwise <b>pcretest</b> will interpret the line as a pattern delimited by &#60;
characters.
For example:
name instead of a pattern. There must be no space between &#60; and the file name,
which must not contain a &#60; character, as otherwise <b>pcretest</b> will
interpret the line as a pattern delimited by &#60; characters. For example:
<pre>
re&#62; &#60;/some/file
Compiled pattern loaded from /some/file
......@@ -1091,7 +1134,7 @@ Cambridge CB2 3QH, England.
</P>
<br><a name="SEC17" href="#TOC1">REVISION</a><br>
<P>
Last updated: 26 April 2013
Last updated: 12 November 2013
<br>
Copyright &copy; 1997-2013 University of Cambridge.
<br>
......
......@@ -4,11 +4,11 @@ pcre-config - program to return PCRE configuration
.SH SYNOPSIS
.rs
.sp
.nf
.B pcre-config [--prefix] [--exec-prefix] [--version] [--libs]
.ti +5n
.B [--libs16] [--libs32] [--libs-cpp] [--libs-posix]
.ti +5n
.B [--cflags] [--cflags-posix]
.B " [--libs16] [--libs32] [--libs-cpp] [--libs-posix]"
.B " [--cflags] [--cflags-posix]"
.fi
.
.
.SH DESCRIPTION
......
.TH PCRE 3 "13 May 2013" "PCRE 8.33"
.TH PCRE 3 "01 Oct 2013" "PCRE 8.33"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH INTRODUCTION
......@@ -44,7 +44,7 @@ The current implementation of PCRE corresponds approximately with Perl 5.12,
including support for UTF-8/16/32 encoded strings and Unicode general category
properties. However, UTF-8/16/32 and Unicode support has to be explicitly
enabled; it is not the default. The Unicode tables correspond to Unicode
release 6.2.0.
release 6.3.0.
.P
In addition to the Perl-compatible matching function, PCRE contains an
alternative function that matches the same compiled patterns in a different
......
This diff is collapsed.
......@@ -8,140 +8,120 @@ PCRE - Perl-compatible regular expressions
.SH "PCRE 16-BIT API BASIC FUNCTIONS"
.rs
.sp
.SM
.nf
.B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B int *\fIerrorcodeptr\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " int *\fIerrorcodeptr\fP,"
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP);
.PP
.B " const char **\fIerrptr\fP);"
.sp
.B void pcre16_free_study(pcre16_extra *\fIextra\fP);
.PP
.sp
.B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
.sp
.B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B int *\fIworkspace\fP, int \fIwscount\fP);
.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " int *\fIworkspace\fP, int \fIwscount\fP);"
.fi
.
.
.SH "PCRE 16-BIT API STRING EXTRACTION FUNCTIONS"
.rs
.sp
.nf
.B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
.ti +5n
.B PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
.B " PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);"
.sp
.B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,
.ti +5n
.B int \fIbuffersize\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,"
.B " int \fIbuffersize\fP);"
.sp
.B int pcre16_get_named_substring(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
.ti +5n
.B PCRE_SPTR16 *\fIstringptr\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
.B " PCRE_SPTR16 *\fIstringptr\fP);"
.sp
.B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIname\fP);
.PP
.B " PCRE_SPTR16 \fIname\fP);
.sp
.B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);
.PP
.B " PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);"
.sp
.B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP,
.ti +5n
.B PCRE_SPTR16 *\fIstringptr\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
.B " PCRE_SPTR16 *\fIstringptr\fP);"
.sp
.B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP,
.ti +5n
.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR16 **\fIlistptr\fP);"
.PP
.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR16 **\fIlistptr\fP);"
.sp
.B void pcre16_free_substring(PCRE_SPTR16 \fIstringptr\fP);
.PP
.sp
.B void pcre16_free_substring_list(PCRE_SPTR16 *\fIstringptr\fP);
.fi
.
.
.SH "PCRE 16-BIT API AUXILIARY FUNCTIONS"
.rs
.sp
.nf
.B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
.PP
.sp
.B void pcre16_jit_stack_free(pcre16_jit_stack *\fIstack\fP);
.PP
.sp
.B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP,
.ti +5n
.B pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);
.PP
.B " pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);"
.sp
.B const unsigned char *pcre16_maketables(void);
.PP
.sp
.B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
.ti +5n
.B int \fIwhat\fP, void *\fIwhere\fP);
.PP
.B " int \fIwhat\fP, void *\fIwhere\fP);"
.sp
.B int pcre16_refcount(pcre16 *\fIcode\fP, int \fIadjust\fP);
.PP
.sp
.B int pcre16_config(int \fIwhat\fP, void *\fIwhere\fP);
.PP
.sp
.B const char *pcre16_version(void);
.PP
.sp
.B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP,
.ti +5n
.B pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);
.B " pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
.fi
.
.
.SH "PCRE 16-BIT API INDIRECTED FUNCTIONS"
.rs
.sp
.nf
.B void *(*pcre16_malloc)(size_t);
.PP
.sp
.B void (*pcre16_free)(void *);
.PP
.sp
.B void *(*pcre16_stack_malloc)(size_t);
.PP
.sp
.B void (*pcre16_stack_free)(void *);
.PP
.sp
.B int (*pcre16_callout)(pcre16_callout_block *);
.fi
.
.
.SH "PCRE 16-BIT API 16-BIT-ONLY FUNCTION"
.rs
.sp
.nf
.B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP,
.ti +5n
.B PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP,
.ti +5n
.B int \fIkeep_boms\fP);
.B " PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP,"
.B " int \fIkeep_boms\fP);"
.fi
.
.
.SH "THE PCRE 16-BIT LIBRARY"
......
......@@ -8,140 +8,119 @@ PCRE - Perl-compatible regular expressions
.SH "PCRE 32-BIT API BASIC FUNCTIONS"
.rs
.sp
.SM
.nf
.B pcre32 *pcre32_compile(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre32 *pcre32_compile2(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B int *\fIerrorcodeptr\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " int *\fIerrorcodeptr\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre32_extra *pcre32_study(const pcre32 *\fIcode\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP);
.PP
.B " const char **\fIerrptr\fP);"
.sp
.B void pcre32_free_study(pcre32_extra *\fIextra\fP);
.PP
.sp
.B int pcre32_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
.PP
.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
.sp
.B int pcre32_dfa_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B int *\fIworkspace\fP, int \fIwscount\fP);
.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " int *\fIworkspace\fP, int \fIwscount\fP);"
.fi
.
.
.SH "PCRE 32-BIT API STRING EXTRACTION FUNCTIONS"
.rs
.sp
.nf
.B int pcre32_copy_named_substring(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,
.ti +5n
.B PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);
.PP
.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
.B " PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);"
.sp
.B int pcre32_copy_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP,
.ti +5n
.B int \fIbuffersize\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP,"
.B " int \fIbuffersize\fP);"
.sp
.B int pcre32_get_named_substring(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,
.ti +5n
.B PCRE_SPTR32 *\fIstringptr\fP);
.PP
.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
.B " PCRE_SPTR32 *\fIstringptr\fP);"
.sp
.B int pcre32_get_stringnumber(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIname\fP);
.PP
.B " PCRE_SPTR32 \fIname\fP);"
.sp
.B int pcre32_get_stringtable_entries(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);
.PP
.B " PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);"
.sp
.B int pcre32_get_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP,
.ti +5n
.B PCRE_SPTR32 *\fIstringptr\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
.B " PCRE_SPTR32 *\fIstringptr\fP);"
.sp
.B int pcre32_get_substring_list(PCRE_SPTR32 \fIsubject\fP,
.ti +5n
.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR32 **\fIlistptr\fP);"
.PP
.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR32 **\fIlistptr\fP);"
.sp
.B void pcre32_free_substring(PCRE_SPTR32 \fIstringptr\fP);
.PP
.sp
.B void pcre32_free_substring_list(PCRE_SPTR32 *\fIstringptr\fP);
.fi
.
.
.SH "PCRE 32-BIT API AUXILIARY FUNCTIONS"
.rs
.sp
.nf
.B pcre32_jit_stack *pcre32_jit_stack_alloc(int \fIstartsize\fP, int \fImaxsize\fP);
.PP
.sp
.B void pcre32_jit_stack_free(pcre32_jit_stack *\fIstack\fP);
.PP
.sp
.B void pcre32_assign_jit_stack(pcre32_extra *\fIextra\fP,
.ti +5n
.B pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);
.PP
.B " pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);"
.sp
.B const unsigned char *pcre32_maketables(void);
.PP
.sp
.B int pcre32_fullinfo(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
.ti +5n
.B int \fIwhat\fP, void *\fIwhere\fP);
.PP
.B " int \fIwhat\fP, void *\fIwhere\fP);"
.sp
.B int pcre32_refcount(pcre32 *\fIcode\fP, int \fIadjust\fP);
.PP
.sp
.B int pcre32_config(int \fIwhat\fP, void *\fIwhere\fP);
.PP
.sp
.B const char *pcre32_version(void);
.PP
.sp
.B int pcre32_pattern_to_host_byte_order(pcre32 *\fIcode\fP,
.ti +5n
.B pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);
.B " pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
.fi
.
.
.SH "PCRE 32-BIT API INDIRECTED FUNCTIONS"
.rs
.sp
.nf
.B void *(*pcre32_malloc)(size_t);
.PP
.sp
.B void (*pcre32_free)(void *);
.PP
.sp
.B void *(*pcre32_stack_malloc)(size_t);
.PP
.sp
.B void (*pcre32_stack_free)(void *);
.PP
.sp
.B int (*pcre32_callout)(pcre32_callout_block *);
.fi
.
.
.SH "PCRE 32-BIT API 32-BIT-ONLY FUNCTION"
.rs
.sp
.nf
.B int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *\fIoutput\fP,
.ti +5n
.B PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP,
.ti +5n
.B int \fIkeep_boms\fP);
.B " PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIbyte_order\fP,"
.B " int \fIkeep_boms\fP);"
.fi
.
.
.SH "THE PCRE 32-BIT LIBRARY"
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B void pcre_assign_jit_stack(pcre_extra *\fIextra\fP,
.ti +5n
.B pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);
.PP
.B " pcre_jit_callback \fIcallback\fP, void *\fIdata\fP);"
.sp
.B void pcre16_assign_jit_stack(pcre16_extra *\fIextra\fP,
.ti +5n
.B pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);
.PP
.B " pcre16_jit_callback \fIcallback\fP, void *\fIdata\fP);"
.sp
.B void pcre32_assign_jit_stack(pcre32_extra *\fIextra\fP,
.ti +5n
.B pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);
.B " pcre32_jit_callback \fIcallback\fP, void *\fIdata\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
.TH PCRE_COMPILE 3 "24 June 2012" "PCRE 8.30"
.TH PCRE_COMPILE 3 "01 October 2013" "PCRE 8.34"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
......@@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre32 *pcre32_compile(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.fi
.
.SH DESCRIPTION
.rs
......@@ -56,6 +51,7 @@ The option bits are:
PCRE_FIRSTLINE Force matching to be before newline
PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
PCRE_MULTILINE ^ and $ match newlines within data
PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
sequences
......@@ -64,6 +60,8 @@ The option bits are:
PCRE_NEWLINE_LF Set LF as the newline sequence
PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
theses (named ones available)
PCRE_NO_AUTO_POSSESS Disable auto-possessification
PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
validity (only relevant if
PCRE_UTF16 is set)
......
.TH PCRE_COMPILE2 3 "24 June 2012" "PCRE 8.30"
.TH PCRE_COMPILE2 3 "01 October 2013" "PCRE 8.34"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
......@@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B int *\fIerrorcodeptr\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " int *\fIerrorcodeptr\fP,"
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B int *\fIerrorcodeptr\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.PP
.B " int *\fIerrorcodeptr\fP,"
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.sp
.B pcre32 *pcre32_compile2(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
.ti +5n
.B int *\fIerrorcodeptr\fP,
.ti +5n
.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
.ti +5n
.B const unsigned char *\fItableptr\fP);
.B " int *\fIerrorcodeptr\fP,£
.B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
.B " const unsigned char *\fItableptr\fP);"
.fi
.
.SH DESCRIPTION
.rs
......@@ -64,6 +56,7 @@ The option bits are:
PCRE_FIRSTLINE Force matching to be before newline
PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
PCRE_MULTILINE ^ and $ match newlines within data
PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
sequences
......@@ -72,6 +65,8 @@ The option bits are:
PCRE_NEWLINE_LF Set LF as the newline sequence
PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
theses (named ones available)
PCRE_NO_AUTO_POSSESS Disable auto-possessification
PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
validity (only relevant if
PCRE_UTF16 is set)
......
.TH PCRE_CONFIG 3 "24 June 2012" "PCRE 8.30"
.TH PCRE_CONFIG 3 "05 November 2013" "PCRE 8.34"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH SYNOPSIS
......@@ -33,6 +33,7 @@ point to an unsigned long integer. The available codes are:
target architecture for the JIT compiler,
or NULL if there is no JIT support
PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
PCRE_CONFIG_PARENS_LIMIT Parentheses nesting limit
PCRE_CONFIG_MATCH_LIMIT Internal resource limit
PCRE_CONFIG_MATCH_LIMIT_RECURSION
Internal recursion depth limit
......
......@@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
.ti +5n
.B const char *\fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, const char *\fIstringname\fP,
.ti +5n
.B char *\fIbuffer\fP, int \fIbuffersize\fP);
.PP
.B " const char *\fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
.B " char *\fIbuffer\fP, int \fIbuffersize\fP);"
.sp
.B int pcre16_copy_named_substring(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
.ti +5n
.B PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
.B " PCRE_UCHAR16 *\fIbuffer\fP, int \fIbuffersize\fP);"
.sp
.B int pcre32_copy_named_substring(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,
.ti +5n
.B PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);
.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
.B " PCRE_UCHAR32 *\fIbuffer\fP, int \fIbuffersize\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
.ti +5n
.B int \fIbuffersize\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,"
.B " int \fIbuffersize\fP);"
.sp
.B int pcre16_copy_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,
.ti +5n
.B int \fIbuffersize\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR16 *\fIbuffer\fP,"
.B " int \fIbuffersize\fP);"
.sp
.B int pcre32_copy_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP,
.ti +5n
.B int \fIbuffersize\fP);
.B " int \fIstringcount\fP, int \fIstringnumber\fP, PCRE_UCHAR32 *\fIbuffer\fP,"
.B " int \fIbuffersize\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_dfa_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
.ti +5n
.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B int *\fIworkspace\fP, int \fIwscount\fP);
.PP
.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " int *\fIworkspace\fP, int \fIwscount\fP);"
.sp
.B int pcre16_dfa_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B int *\fIworkspace\fP, int \fIwscount\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " int *\fIworkspace\fP, int \fIwscount\fP);"
.sp
.B int pcre32_dfa_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B int *\fIworkspace\fP, int \fIwscount\fP);
.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " int *\fIworkspace\fP, int \fIwscount\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
.ti +5n
.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
.PP
.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
.sp
.B int pcre16_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
.sp
.B int pcre32_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
.ti +5n
.B int \fIwhat\fP, void *\fIwhere\fP);
.PP
.B " int \fIwhat\fP, void *\fIwhere\fP);"
.sp
.B int pcre16_fullinfo(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
.ti +5n
.B int \fIwhat\fP, void *\fIwhere\fP);
.PP
.B " int \fIwhat\fP, void *\fIwhere\fP);"
.sp
.B int pcre32_fullinfo(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
.ti +5n
.B int \fIwhat\fP, void *\fIwhere\fP);
.B " int \fIwhat\fP, void *\fIwhere\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_get_named_substring(const pcre *\fIcode\fP,
.ti +5n
.B const char *\fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, const char *\fIstringname\fP,
.ti +5n
.B const char **\fIstringptr\fP);
.PP
.B " const char *\fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, const char *\fIstringname\fP,"
.B " const char **\fIstringptr\fP);"
.sp
.B int pcre16_get_named_substring(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,
.ti +5n
.B PCRE_SPTR16 *\fIstringptr\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR16 \fIstringname\fP,"
.B " PCRE_SPTR16 *\fIstringptr\fP);"
.sp
.B int pcre32_get_named_substring(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,
.ti +5n
.B PCRE_SPTR32 *\fIstringptr\fP);
.B " PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,"
.B " int \fIstringcount\fP, PCRE_SPTR32 \fIstringname\fP,"
.B " PCRE_SPTR32 *\fIstringptr\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
.ti +5n
.B const char *\fIname\fP);
.PP
.B " const char *\fIname\fP);"
.sp
.B int pcre16_get_stringnumber(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIname\fP);
.PP
.B " PCRE_SPTR16 \fIname\fP);"
.sp
.B int pcre32_get_stringnumber(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIname\fP);
.B " PCRE_SPTR32 \fIname\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_get_stringtable_entries(const pcre *\fIcode\fP,
.ti +5n
.B const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);
.PP
.B " const char *\fIname\fP, char **\fIfirst\fP, char **\fIlast\fP);"
.sp
.B int pcre16_get_stringtable_entries(const pcre16 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);
.PP
.B " PCRE_SPTR16 \fIname\fP, PCRE_UCHAR16 **\fIfirst\fP, PCRE_UCHAR16 **\fIlast\fP);"
.sp
.B int pcre32_get_stringtable_entries(const pcre32 *\fIcode\fP,
.ti +5n
.B PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);
.B " PCRE_SPTR32 \fIname\fP, PCRE_UCHAR32 **\fIfirst\fP, PCRE_UCHAR32 **\fIlast\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,24 +6,19 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP,
.ti +5n
.B const char **\fIstringptr\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
.B " const char **\fIstringptr\fP);"
.sp
.B int pcre16_get_substring(PCRE_SPTR16 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP,
.ti +5n
.B PCRE_SPTR16 *\fIstringptr\fP);
.PP
.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
.B " PCRE_SPTR16 *\fIstringptr\fP);"
.sp
.B int pcre32_get_substring(PCRE_SPTR32 \fIsubject\fP, int *\fIovector\fP,
.ti +5n
.B int \fIstringcount\fP, int \fIstringnumber\fP,
.ti +5n
.B PCRE_SPTR32 *\fIstringptr\fP);
.B " int \fIstringcount\fP, int \fIstringnumber\fP,"
.B " PCRE_SPTR32 *\fIstringptr\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_get_substring_list(const char *\fIsubject\fP,
.ti +5n
.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
.PP
.B " int *\fIovector\fP, int \fIstringcount\fP, const char ***\fIlistptr\fP);"
.sp
.B int pcre16_get_substring_list(PCRE_SPTR16 \fIsubject\fP,
.ti +5n
.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR16 **\fIlistptr\fP);"
.PP
.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR16 **\fIlistptr\fP);"
.sp
.B int pcre32_get_substring_list(PCRE_SPTR32 \fIsubject\fP,
.ti +5n
.B int *\fIovector\fP, int \fIstringcount\fP, "PCRE_SPTR32 **\fIlistptr\fP);"
.B " int *\fIovector\fP, int \fIstringcount\fP, PCRE_SPTR32 **\fIlistptr\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,30 +6,22 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_jit_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
.ti +5n
.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B pcre_jit_stack *\fIjstack\fP);
.PP
.B " const char *\fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " pcre_jit_stack *\fIjstack\fP);"
.sp
.B int pcre16_jit_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B pcre_jit_stack *\fIjstack\fP);
.PP
.B " PCRE_SPTR16 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " pcre_jit_stack *\fIjstack\fP);"
.sp
.B int pcre32_jit_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
.ti +5n
.B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
.ti +5n
.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
.ti +5n
.B pcre_jit_stack *\fIjstack\fP);
.B " PCRE_SPTR32 \fIsubject\fP, int \fIlength\fP, int \fIstartoffset\fP,"
.B " int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,"
.B " pcre_jit_stack *\fIjstack\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B pcre_jit_stack *pcre_jit_stack_alloc(int \fIstartsize\fP,
.ti +5n
.B int \fImaxsize\fP);
.PP
.B " int \fImaxsize\fP);"
.sp
.B pcre16_jit_stack *pcre16_jit_stack_alloc(int \fIstartsize\fP,
.ti +5n
.B int \fImaxsize\fP);
.PP
.B " int \fImaxsize\fP);"
.sp
.B pcre32_jit_stack *pcre32_jit_stack_alloc(int \fIstartsize\fP,
.ti +5n
.B int \fImaxsize\fP);
.B " int \fImaxsize\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre_pattern_to_host_byte_order(pcre *\fIcode\fP,
.ti +5n
.B pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);
.PP
.B " pcre_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
.sp
.B int pcre16_pattern_to_host_byte_order(pcre16 *\fIcode\fP,
.ti +5n
.B pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);
.PP
.B " pcre16_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
.sp
.B int pcre32_pattern_to_host_byte_order(pcre32 *\fIcode\fP,
.ti +5n
.B pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);
.B " pcre32_extra *\fIextra\fP, const unsigned char *\fItables\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,18 +6,16 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP);
.PP
.B " const char **\fIerrptr\fP);"
.sp
.B pcre16_extra *pcre16_study(const pcre16 *\fIcode\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP);
.PP
.B " const char **\fIerrptr\fP);"
.sp
.B pcre32_extra *pcre32_study(const pcre32 *\fIcode\fP, int \fIoptions\fP,
.ti +5n
.B const char **\fIerrptr\fP);
.B " const char **\fIerrptr\fP);"
.fi
.
.SH DESCRIPTION
.rs
......
......@@ -6,12 +6,11 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *\fIoutput\fP,
.ti +5n
.B PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,
.ti +5n
.B int \fIkeep_boms\fP);
.B " PCRE_SPTR16 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,"
.B " int \fIkeep_boms\fP);"
.fi
.
.
.SH DESCRIPTION
......
......@@ -6,12 +6,11 @@ PCRE - Perl-compatible regular expressions
.sp
.B #include <pcre.h>
.PP
.SM
.nf
.B int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *\fIoutput\fP,
.ti +5n
.B PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,
.ti +5n
.B int \fIkeep_boms\fP);
.B " PCRE_SPTR32 \fIinput\fP, int \fIlength\fP, int *\fIhost_byte_order\fP,"
.B " int \fIkeep_boms\fP);"
.fi
.
.
.SH DESCRIPTION
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.TH PCREMATCHING 3 "08 January 2012" "PCRE 8.30"
.TH PCREMATCHING 3 "12 November 2013" "PCRE 8.34"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE MATCHING ALGORITHMS"
......@@ -106,6 +106,14 @@ the three strings "caterpillar", "cater", and "cat" that start at the fifth
character of the subject. The algorithm does not automatically move on to find
matches that start at later positions.
.P
PCRE's "auto-possessification" optimization usually applies to character
repeats at the end of a pattern (as well as internally). For example, the
pattern "a\ed+" is compiled as if it were "a\ed++" because there is no point
even considering the possibility of backtracking into the repeated digits. For
DFA matching, this means that only one possible match is found. If you really
do want multiple matches in such cases, either use an ungreedy repeat
("a\ed+?") or set the PCRE_NO_AUTO_POSSESS option when compiling.
.P
There are a number of features of PCRE regular expressions that are not
supported by the alternative matching algorithm. They are as follows:
.P
......@@ -201,6 +209,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
Last updated: 08 January 2012
Last updated: 12 November 2013
Copyright (c) 1997-2012 University of Cambridge.
.fi
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment