[pcre-dev] [Bug 1480] New: pcretest / pcregrep -o incompatab…

Pàgina inicial
Delete this message
Autor: David Schmitt
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 1480] New: pcretest / pcregrep -o incompatability
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1480
           Summary: pcretest / pcregrep -o incompatability
           Product: PCRE
           Version: 8.33
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: david.a.schmitt@???
                CC: pcre-dev@???



"pcretest" and "pcregrep -o" display different results for possessive
quantifiers in some circumstances. It seems that (at least) one of them must
be incorrect.

Sample test script that demonstrates the discrepancy:

=========================================================================
#!/bin/sh

export PATTERN='\A(?:[^"]++|"(?:[^"]*+|"")*+")++'
export TEXT='NON QUOTED "QUOT""ED" AFTER "NOT MATCHED'

cat <<EOF |
/$PATTERN/
$TEXT
EOF
pcretest

pcregrep -V
echo "$TEXT" | pcregrep -o -e "$PATTERN"
==========================================================================

Script output:

PCRE version 8.33 2013-05-28

re> data> 0: NON QUOTED
data>

pcregrep version 8.33 2013-05-28
NON QUOTED "QUOT""ED" AFTER


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