Documentation update.
This commit is contained in:
parent
486a66681f
commit
79bbc574a0
|
@ -19,7 +19,7 @@ SYNOPSIS
|
||||||
<b>#include <pcre2.h></b>
|
<b>#include <pcre2.h></b>
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
<b>const unsigned char *pcre2_maketables(pcre22_general_context *<i>gcontext</i>);</b>
|
<b>const unsigned char *pcre2_maketables(pcre2_general_context *<i>gcontext</i>);</b>
|
||||||
</P>
|
</P>
|
||||||
<br><b>
|
<br><b>
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
|
@ -1331,9 +1331,26 @@ documentation.
|
||||||
PCRE2_ENDANCHORED
|
PCRE2_ENDANCHORED
|
||||||
</pre>
|
</pre>
|
||||||
If this bit is set, the end of any pattern match must be right at the end of
|
If this bit is set, the end of any pattern match must be right at the end of
|
||||||
the string being searched (the "subject string"). This effect can also be
|
the string being searched (the "subject string"). If the pattern match
|
||||||
|
succeeds by reaching (*ACCEPT), but does not reach the end of the subject, the
|
||||||
|
match fails at the current starting point. For unanchored patterns, a new match
|
||||||
|
is then tried at the next starting point. However, if the match succeeds by
|
||||||
|
reaching the end of the pattern, but not the end of the subject, backtracking
|
||||||
|
occurs and an alternative match may be found. Consider these two patterns:
|
||||||
|
<pre>
|
||||||
|
.(*ACCEPT)|..
|
||||||
|
.|..
|
||||||
|
</pre>
|
||||||
|
If matched against "abc" with PCRE2_ENDANCHORED set, the first matches "c"
|
||||||
|
whereas the second matches "bc". The effect of PCRE2_ENDANCHORED can also be
|
||||||
achieved by appropriate constructs in the pattern itself, which is the only way
|
achieved by appropriate constructs in the pattern itself, which is the only way
|
||||||
to do it in Perl.
|
to do it in Perl.
|
||||||
|
</P>
|
||||||
|
<P>
|
||||||
|
For DFA matching with <b>pcre2_dfa_match()</b>, PCRE2_ENDANCHORED applies only
|
||||||
|
to the first (that is, the longest) matched string. Other parallel matches,
|
||||||
|
which are necessarily substrings of the first one, must obviously end before
|
||||||
|
the end of the subject.
|
||||||
<pre>
|
<pre>
|
||||||
PCRE2_EXTENDED
|
PCRE2_EXTENDED
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -3327,7 +3344,7 @@ Cambridge, England.
|
||||||
</P>
|
</P>
|
||||||
<br><a name="SEC42" href="#TOC1">REVISION</a><br>
|
<br><a name="SEC42" href="#TOC1">REVISION</a><br>
|
||||||
<P>
|
<P>
|
||||||
Last updated: 11 April 2017
|
Last updated: 14 April 2017
|
||||||
<br>
|
<br>
|
||||||
Copyright © 1997-2017 University of Cambridge.
|
Copyright © 1997-2017 University of Cambridge.
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -206,8 +206,8 @@ callouts such as the example above are obeyed.
|
||||||
<br><a name="SEC4" href="#TOC1">THE CALLOUT INTERFACE</a><br>
|
<br><a name="SEC4" href="#TOC1">THE CALLOUT INTERFACE</a><br>
|
||||||
<P>
|
<P>
|
||||||
During matching, when PCRE2 reaches a callout point, if an external function is
|
During matching, when PCRE2 reaches a callout point, if an external function is
|
||||||
set in the match context, it is called. This applies to both normal and DFA
|
provided in the match context, it is called. This applies to both normal and
|
||||||
matching. The first argument to the callout function is a pointer to a
|
DFA matching. The first argument to the callout function is a pointer to a
|
||||||
<b>pcre2_callout</b> block. The second argument is the void * callout data that
|
<b>pcre2_callout</b> block. The second argument is the void * callout data that
|
||||||
was supplied when the callout was set up by calling <b>pcre2_set_callout()</b>
|
was supplied when the callout was set up by calling <b>pcre2_set_callout()</b>
|
||||||
(see the
|
(see the
|
||||||
|
@ -276,7 +276,7 @@ callout.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
The <i>offset_vector</i> field is a pointer to a vector of capturing offsets
|
The <i>offset_vector</i> field is a pointer to a vector of capturing offsets
|
||||||
(the "ovector"). You may read certain elements in this vector, but you must not
|
(the "ovector"). You may read the elements in this vector, but you must not
|
||||||
change any of them.
|
change any of them.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
|
@ -300,9 +300,10 @@ for example, when the callout in the pattern ((a)(b))(?C2) is taken,
|
||||||
The contents of ovector[2] to ovector[<capture_top>*2-1] can be inspected in
|
The contents of ovector[2] to ovector[<capture_top>*2-1] can be inspected in
|
||||||
order to extract substrings that have been matched so far, in the same way as
|
order to extract substrings that have been matched so far, in the same way as
|
||||||
extracting substrings after a match has completed. The values in ovector[0] and
|
extracting substrings after a match has completed. The values in ovector[0] and
|
||||||
ovector[1] are undefined and should not be used in any way. Substrings that
|
ovector[1] are always PCRE2_UNSET because the match is by definition not
|
||||||
have not been captured (but whose numbers are less than <i>capture_top</i>) have
|
complete. Substrings that have not been captured but whose numbers are less
|
||||||
both of their ovector slots set to PCRE2_UNSET.
|
than <i>capture_top</i> also have both of their ovector slots set to
|
||||||
|
PCRE2_UNSET.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
For DFA matching, the <i>offset_vector</i> field points to the ovector that was
|
For DFA matching, the <i>offset_vector</i> field points to the ovector that was
|
||||||
|
@ -427,7 +428,7 @@ Cambridge, England.
|
||||||
</P>
|
</P>
|
||||||
<br><a name="SEC8" href="#TOC1">REVISION</a><br>
|
<br><a name="SEC8" href="#TOC1">REVISION</a><br>
|
||||||
<P>
|
<P>
|
||||||
Last updated: 29 March 2017
|
Last updated: 14 April 2017
|
||||||
<br>
|
<br>
|
||||||
Copyright © 1997-2017 University of Cambridge.
|
Copyright © 1997-2017 University of Cambridge.
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1351,10 +1351,27 @@ COMPILING A PATTERN
|
||||||
PCRE2_ENDANCHORED
|
PCRE2_ENDANCHORED
|
||||||
|
|
||||||
If this bit is set, the end of any pattern match must be right at the
|
If this bit is set, the end of any pattern match must be right at the
|
||||||
end of the string being searched (the "subject string"). This effect
|
end of the string being searched (the "subject string"). If the pattern
|
||||||
|
match succeeds by reaching (*ACCEPT), but does not reach the end of the
|
||||||
|
subject, the match fails at the current starting point. For unanchored
|
||||||
|
patterns, a new match is then tried at the next starting point. How-
|
||||||
|
ever, if the match succeeds by reaching the end of the pattern, but not
|
||||||
|
the end of the subject, backtracking occurs and an alternative match
|
||||||
|
may be found. Consider these two patterns:
|
||||||
|
|
||||||
|
.(*ACCEPT)|..
|
||||||
|
.|..
|
||||||
|
|
||||||
|
If matched against "abc" with PCRE2_ENDANCHORED set, the first matches
|
||||||
|
"c" whereas the second matches "bc". The effect of PCRE2_ENDANCHORED
|
||||||
can also be achieved by appropriate constructs in the pattern itself,
|
can also be achieved by appropriate constructs in the pattern itself,
|
||||||
which is the only way to do it in Perl.
|
which is the only way to do it in Perl.
|
||||||
|
|
||||||
|
For DFA matching with pcre2_dfa_match(), PCRE2_ENDANCHORED applies only
|
||||||
|
to the first (that is, the longest) matched string. Other parallel
|
||||||
|
matches, which are necessarily substrings of the first one, must obvi-
|
||||||
|
ously end before the end of the subject.
|
||||||
|
|
||||||
PCRE2_EXTENDED
|
PCRE2_EXTENDED
|
||||||
|
|
||||||
If this bit is set, most white space characters in the pattern are
|
If this bit is set, most white space characters in the pattern are
|
||||||
|
@ -3241,7 +3258,7 @@ AUTHOR
|
||||||
|
|
||||||
REVISION
|
REVISION
|
||||||
|
|
||||||
Last updated: 11 April 2017
|
Last updated: 14 April 2017
|
||||||
Copyright (c) 1997-2017 University of Cambridge.
|
Copyright (c) 1997-2017 University of Cambridge.
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3965,12 +3982,12 @@ MISSING CALLOUTS
|
||||||
THE CALLOUT INTERFACE
|
THE CALLOUT INTERFACE
|
||||||
|
|
||||||
During matching, when PCRE2 reaches a callout point, if an external
|
During matching, when PCRE2 reaches a callout point, if an external
|
||||||
function is set in the match context, it is called. This applies to
|
function is provided in the match context, it is called. This applies
|
||||||
both normal and DFA matching. The first argument to the callout func-
|
to both normal and DFA matching. The first argument to the callout
|
||||||
tion is a pointer to a pcre2_callout block. The second argument is the
|
function is a pointer to a pcre2_callout block. The second argument is
|
||||||
void * callout data that was supplied when the callout was set up by
|
the void * callout data that was supplied when the callout was set up
|
||||||
calling pcre2_set_callout() (see the pcre2api documentation). The call-
|
by calling pcre2_set_callout() (see the pcre2api documentation). The
|
||||||
out block structure contains the following fields:
|
callout block structure contains the following fields:
|
||||||
|
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
uint32_t callout_number;
|
uint32_t callout_number;
|
||||||
|
@ -4027,8 +4044,8 @@ THE CALLOUT INTERFACE
|
||||||
of callout.
|
of callout.
|
||||||
|
|
||||||
The offset_vector field is a pointer to a vector of capturing offsets
|
The offset_vector field is a pointer to a vector of capturing offsets
|
||||||
(the "ovector"). You may read certain elements in this vector, but you
|
(the "ovector"). You may read the elements in this vector, but you must
|
||||||
must not change any of them.
|
not change any of them.
|
||||||
|
|
||||||
For calls to pcre2_match(), the offset_vector field is not (since
|
For calls to pcre2_match(), the offset_vector field is not (since
|
||||||
release 10.30) a pointer to the actual ovector that was passed to the
|
release 10.30) a pointer to the actual ovector that was passed to the
|
||||||
|
@ -4049,10 +4066,10 @@ THE CALLOUT INTERFACE
|
||||||
The contents of ovector[2] to ovector[<capture_top>*2-1] can be
|
The contents of ovector[2] to ovector[<capture_top>*2-1] can be
|
||||||
inspected in order to extract substrings that have been matched so far,
|
inspected in order to extract substrings that have been matched so far,
|
||||||
in the same way as extracting substrings after a match has completed.
|
in the same way as extracting substrings after a match has completed.
|
||||||
The values in ovector[0] and ovector[1] are undefined and should not be
|
The values in ovector[0] and ovector[1] are always PCRE2_UNSET because
|
||||||
used in any way. Substrings that have not been captured (but whose num-
|
the match is by definition not complete. Substrings that have not been
|
||||||
bers are less than capture_top) have both of their ovector slots set to
|
captured but whose numbers are less than capture_top also have both of
|
||||||
PCRE2_UNSET.
|
their ovector slots set to PCRE2_UNSET.
|
||||||
|
|
||||||
For DFA matching, the offset_vector field points to the ovector that
|
For DFA matching, the offset_vector field points to the ovector that
|
||||||
was passed to the matching function in the match data block, but it
|
was passed to the matching function in the match data block, but it
|
||||||
|
@ -4170,7 +4187,7 @@ AUTHOR
|
||||||
|
|
||||||
REVISION
|
REVISION
|
||||||
|
|
||||||
Last updated: 29 March 2017
|
Last updated: 14 April 2017
|
||||||
Copyright (c) 1997-2017 University of Cambridge.
|
Copyright (c) 1997-2017 University of Cambridge.
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH PCRE2_MAKETABLES 3 "24 March 2017" "PCRE2 10.30"
|
.TH PCRE2_MAKETABLES 3 "17 April 2017" "PCRE2 10.30"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
PCRE2 - Perl-compatible regular expressions (revised API)
|
PCRE2 - Perl-compatible regular expressions (revised API)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -7,7 +7,7 @@ PCRE2 - Perl-compatible regular expressions (revised API)
|
||||||
.B #include <pcre2.h>
|
.B #include <pcre2.h>
|
||||||
.PP
|
.PP
|
||||||
.SM
|
.SM
|
||||||
.B const unsigned char *pcre2_maketables(pcre22_general_context *\fIgcontext\fP);
|
.B const unsigned char *pcre2_maketables(pcre2_general_context *\fIgcontext\fP);
|
||||||
.
|
.
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.rs
|
.rs
|
||||||
|
|
Loading…
Reference in New Issue