[pcre-dev] [Bug 1351] New: pcregrep doesn't match empty/blan…

Góra strony
Delete this message
Autor: Hunter Goatley
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 1351] New: pcregrep doesn't match empty/blank lines
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1351
           Summary: pcregrep doesn't match empty/blank lines
           Product: PCRE
           Version: 8.32
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: goathunter@???
                CC: pcre-dev@???



I searched, but didn't see a similar report.

In an older version (sorry, I'm not exactly sure what version this worked in),
I could use pcregrep to find blank lines in a file using the pattern "^$". That
doesn't work in the current version (8.32) of pcregrep. I've experienced this
under both Linux and my port to OpenVMS.

I created a file x.x that consisted of a blank line, followed by a line
containing the word "hello".

On Linux (CentOS 6.4 32-bit):

------------------
[goathunter@localhost pcre-8.32]$ grep "^$" x.x

[goathunter@localhost pcre-8.32]$ ./pcregrep "^$" x.x
[goathunter@localhost pcre-8.32]$
------------------

I've tried to debug this myself, but haven't come up with any reason yet.

If I use my old pcregrep.c with this line:

#define VERSION "4.4 29-Nov-2006"

that pattern matches blank lines as expected. I saw this problem at least as
far back as 8.02.

Thanks for any help or insight.

Hunter


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