diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2010-11-06 17:36:26 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2010-11-06 17:36:26 +0000 |
commit | d04625dfed2986d95e3d39df9ed653d5d6de7ab3 (patch) | |
tree | 54fa97067f8fa2dd64414bf759676d8321650cbd | |
parent | 816309b6a76b4454b9e24dcd47d83960c92ad68b (diff) | |
download | pcre-d04625dfed2986d95e3d39df9ed653d5d6de7ab3.tar.gz |
Clarify documentation about ovector setting.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@568 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | doc/pcreapi.3 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/pcreapi.3 b/doc/pcreapi.3 index e3a9869..025e41b 100644 --- a/doc/pcreapi.3 +++ b/doc/pcreapi.3 @@ -1674,9 +1674,14 @@ Offset values that correspond to unused subpatterns at the end of the expression are also set to -1. For example, if the string "abc" is matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not matched. The return from the function is 2, because the highest used capturing subpattern -number is 1. However, you can refer to the offsets for the second and third -capturing subpatterns if you wish (assuming the vector is large enough, of -course). +number is 1, and the offsets for for the second and third capturing subpatterns +(assuming the vector is large enough, of course) are set to -1. +.P +\fBNote\fP: Elements of \fIovector\fP that do not correspond to capturing +parentheses in the pattern are never changed. That is, if a pattern contains +\fIn\fP capturing parentheses, no more than \fIovector[0]\fP to +\fIovector[2n+1]\fP are set by \fBpcre_exec()\fP. The other elements retain +whatever values they previously had. .P Some convenience functions are provided for extracting the captured substrings as separate strings. These are described below. |