[pcre-dev] [Bug 733] pcre_fullinfo() returns wrong PCRE_INF…

Etusivu
Poista viesti
Lähettäjä: Dmitry Ukolov
Päiväys:  
Vastaanottaja: pcre-dev
Aihe: [pcre-dev] [Bug 733] pcre_fullinfo() returns wrong PCRE_INFO_NAMECOUNT on some patterns
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=733




--- Comment #2 from Dmitry Ukolov <udmitry@???> 2008-07-14 18:00:21 ---
I have compiled PCRETEST 7.0, downloaded from
http://gnuwin32.sourceforge.net/packages/pcre.htm (file URL is
http://gnuwin32.sourceforge.net/downlinks/pcre-bin-zip.php)

results of test:
>>>

PCRE version 7.0 18-Dec-2006

re> /(?x)1|2# (?<N>3)/I

Capturing subpattern count = 0
Named capturing subpatterns:
BSX 11862
Options: extended
No first char
No need char
data>
re> /(?x)1|2 #(?<N>3)/I

Capturing subpattern count = 0
Named capturing subpatterns:
BSX 11862
Options: extended
No first char
No need char

re> /(?x)1|2 #(?<N>3) (?<N2>4) /I

Capturing subpattern count = 0
Named capturing subpatterns:
  Model 22X        13856
   22X   25964
Options: extended
No first char
No need char


>>>


On version 7.7 it's return the same result.
I' coding on Pascal, don't have C sources, and test code is very simple:
---
...
re := pcre_compile('(?x)1|2 #(?<N>3)', 0, @ErrorPtr, @ErrorOffset, nil);
Res := pcre_fullinfo(re, nil, PCRE_INFO_NAMECOUNT, @NameCount);
// NameCount = 1 !!!
...


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email