[pcre-dev] [Bug 1159] New: pcre_match recursive does not wor…

Αρχική Σελίδα
Delete this message
Συντάκτης: Sajid Mahmood
Ημερομηνία:  
Προς: pcre-dev
Αντικείμενο: [pcre-dev] [Bug 1159] New: pcre_match recursive does not work with start of subject ^ option
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1159
           Summary: pcre_match recursive does not work with start of subject
                    ^  option
           Product: PCRE
           Version: 8.13
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: sajidm@???
                CC: pcre-dev@???



Created an attachment (id=501)
--> (http://bugs.exim.org/attachment.cgi?id=501)
pcretest input file

According to pcre documentation ^ and $ are not part of recursive pattern but
recursive pattern does not work if we have specified ^ option. Following is
test with pcretest program.

./pcretest -q testdata/testinput120
!^(\d+(\s*,\s*(?R))*)!
    22222,  33333, 44444 ,55555 , abcd,defg,4537, 6537, 8774
 0: 22222
 1: 22222


!(\d+(\s*,\s*(?R))*)$!
    22222,  33333, 44444 ,55555 , abcd,defg,4537, 6537, 8774
 0: 4537, 6537, 8774
 1: 4537, 6537, 8774
 2: , 6537, 8774


/-- End of testinput120 --/

It only matches first digit but it should match all four digits. so epected
result should be
0:22222, 33333, 44444 ,55555
1:22222, 33333, 44444 ,55555


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