[Pcre-svn] [568] code/trunk/doc/pcreapi.3: Clarify documenta…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [568] code/trunk/doc/pcreapi.3: Clarify documentation about ovector setting .
Revision: 568
          http://vcs.pcre.org/viewvc?view=rev&revision=568
Author:   ph10
Date:     2010-11-06 17:36:26 +0000 (Sat, 06 Nov 2010)


Log Message:
-----------
Clarify documentation about ovector setting.

Modified Paths:
--------------
    code/trunk/doc/pcreapi.3


Modified: code/trunk/doc/pcreapi.3
===================================================================
--- code/trunk/doc/pcreapi.3    2010-11-06 17:10:00 UTC (rev 567)
+++ code/trunk/doc/pcreapi.3    2010-11-06 17:36:26 UTC (rev 568)
@@ -1674,10 +1674,15 @@
 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.
 .