summaryrefslogtreecommitdiff
path: root/doc/pcre2api.3
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2018-06-18 16:49:12 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2018-06-18 16:49:12 +0000
commit9d868498dc1dc01f030ad527f8e5cced50efc0a5 (patch)
treebea383175ddf5aa41a42e792dbe44312a15e3d91 /doc/pcre2api.3
parent219fa022fe95b36dbdd162b8a9e94f543cba07a6 (diff)
downloadpcre2-9d868498dc1dc01f030ad527f8e5cced50efc0a5.tar.gz
Documentation update.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@938 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc/pcre2api.3')
-rw-r--r--doc/pcre2api.324
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/pcre2api.3 b/doc/pcre2api.3
index 4d1d022..6b2bca4 100644
--- a/doc/pcre2api.3
+++ b/doc/pcre2api.3
@@ -1,4 +1,4 @@
-.TH PCRE2API 3 "27 April 2018" "PCRE2 10.32"
+.TH PCRE2API 3 "18 June 2018" "PCRE2 10.32"
.SH NAME
PCRE2 - Perl-compatible regular expressions (revised API)
.sp
@@ -917,9 +917,9 @@ is set to a value less than 21 (in particular, zero) no heap memory will be
used. In this case, only patterns that do not have a lot of nested backtracking
can be successfully processed.
.P
-Similarly, for \fBpcre2_dfa_match()\fP, a vector on the system stack is used
-when processing pattern recursions, lookarounds, or atomic groups, and only if
-this is not big enough is heap memory used. In this case, too, setting a value
+Similarly, for \fBpcre2_dfa_match()\fP, a vector on the system stack is used
+when processing pattern recursions, lookarounds, or atomic groups, and only if
+this is not big enough is heap memory used. In this case, too, setting a value
of zero disables the use of the heap.
.sp
.nf
@@ -990,7 +990,7 @@ using \fBpcre2_dfa_match()\fP, can use a great deal of memory. However, it is
probably better to limit heap usage directly by calling
\fBpcre2_set_heap_limit()\fP.
.P
-The default value for the depth limit can be set when PCRE2 is built; if it is
+The default value for the depth limit can be set when PCRE2 is built; if it is
not, the default is set to the same value as the default for the match limit.
If the limit is exceeded, \fBpcre2_match()\fP or \fBpcre2_dfa_match()\fP
returns PCRE2_ERROR_DEPTHLIMIT. A value for the depth limit may also be
@@ -1052,7 +1052,7 @@ given with \fBpcre2_set_depth_limit()\fP above.
PCRE2_CONFIG_HEAPLIMIT
.sp
The output is a uint32_t integer that gives, in kibibytes, the default limit
-for the amount of heap memory used by \fBpcre2_match()\fP or
+for the amount of heap memory used by \fBpcre2_match()\fP or
\fBpcre2_dfa_match()\fP. Further details are given with
\fBpcre2_set_heap_limit()\fP above.
.sp
@@ -2552,7 +2552,7 @@ performance reasons, you can set the PCRE2_NO_UTF_CHECK option when calling
calls to \fBpcre2_match()\fP if you are making repeated calls to find other
matches in the same subject string.
.P
-WARNING: When PCRE2_NO_UTF_CHECK is set, the effect of passing an invalid
+\fBWarning:\fP When PCRE2_NO_UTF_CHECK is set, the effect of passing an invalid
string as a subject, or an invalid value of \fIstartoffset\fP, is undefined.
Your program may crash or loop indefinitely.
.sp
@@ -2769,6 +2769,14 @@ When it matches "bc", the returned name is A. The B mark is "seen" in the first
branch of the group, but it is not on the matching path. On the other hand,
when this pattern fails to match "bx", the returned name is B.
.P
+\fBWarning:\fP By default, certain start-of-match optimizations are used to
+give a fast "no match" result in some situations. For example, if the anchoring
+is removed from the pattern above, there is an initial check for the presence
+of "c" in the subject before running the matching engine. This check fails for
+"bx", causing a match failure without seeing any marks. You can disable the
+start-of-match optimizations by setting the PCRE2_NO_START_OPTIMIZE option for
+\fBpcre2_compile()\fP or starting the pattern with (*NO_START_OPT).
+.P
After a successful match, a partial match, or one of the invalid UTF errors
(for example, PCRE2_ERROR_UTF8_ERR5), \fBpcre2_get_startchar()\fP can be
called. After a successful or partial match it returns the code unit offset of
@@ -3613,6 +3621,6 @@ Cambridge, England.
.rs
.sp
.nf
-Last updated: 27 April 2018
+Last updated: 18 June 2018
Copyright (c) 1997-2018 University of Cambridge.
.fi