Hi,
kindly acknowledge if the following is a defect in PCRE library or not.
Here, I'm giving a regular expression which consists of an empty character class
to the pcretest program which accepts it without giving any error.
mladhe@linux61:~/softwares/pcre-7.8/cmake] ./pcretest
PCRE version 7.8 2008-09-05
re> /[^\x00-\xff]/
data> \x00
No match
data> \xff
No match
data> \x80
No match
data>
It does not match any character as shown by a few examples above.
Thanks,
Mahendra Ladhe
Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/From ph10@??? Tue Nov 04 20:34:31 2008
Envelope-to: pcre-dev@???
Received: from ppsw-0.csi.cam.ac.uk ([131.111.8.130]:43581)
by tahini.csx.cam.ac.uk with esmtp (Exim 4.69)
(envelope-from <ph10@???>) id 1KxSbf-00070M-1Q
for pcre-dev@???; Tue, 04 Nov 2008 20:34:31 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from demon-gw.quercite.com ([83.104.196.193]:50663
helo?ercite.quercite.com)
by ppsw-0.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.150]:587)
with esmtpsa (PLAIN:ph10) (TLSv1:DHE-RSA-AES256-SHA:256)
id 1KxSbe-0001c0-2e (Exim 4.70)
(return-path <ph10@???>); Tue, 04 Nov 2008 20:34:31 +0000
Date: Tue, 4 Nov 2008 20:34:29 +0000 (GMT)
From: Philip Hazel <ph10@???>
To: Mahendra Ladhe <lml108@???>
In-Reply-To: <544486.15205.qm@???>
Message-ID: <Pine.LNX.4.64.0811042032010.26649@???>
References: <544486.15205.qm@???>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED;
BOUNDARY!750319812-1944530493-1225830869?6649"
X-Spam-Score: -2.5 (--)
X-Spam-Status: No, score?.5 required~0 tests?L_TRUSTED?.8, AWL?.702,
BAYES_00?.5,
DNS_FROM_SECURITYSAGE>513 autolearnO version^1.8
Cc: pcre-dev@???
Subject: Re: [pcre-dev] pcretest program accepts empty character class
X-BeenThere: pcre-dev@???
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: pcre-dev@???
List-Id: PCRE Development <pcre-dev.exim.org>
List-Unsubscribe: <http://lists.exim.org/mailman/listinfo/pcre-dev>,
<mailto:pcre-dev-request@exim.org?subject?subscribe>
List-Archive: <http://lists.exim.org/lurker/list/pcre-dev.html>
List-Post: <mailto:pcre-dev@exim.org>
List-Help: <mailto:pcre-dev-request@exim.org?subject?lp>
List-Subscribe: <http://lists.exim.org/mailman/listinfo/pcre-dev>,
<mailto:pcre-dev-request@exim.org?subject?bscribe>
X-List-Received-Date: Tue, 04 Nov 2008 20:34:31 -0000
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--1750319812-1944530493-1225830869?6649
Content-Type: TEXT/PLAIN; charset?O-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Tue, 4 Nov 2008, Mahendra Ladhe wrote:
> ?? kindly acknowledge if the following is a defect in PCRE library or
> not. Here, I'm giving a regular expression which consists of an empty
> character class to the pcretest program which accepts it without
> giving any error.
>
> mladhe@linux61:~/softwares/pcre-7.8/cmake] ./pcretest
> PCRE version 7.8 2008-09-05
>
> ? re> /[^\x00-\xff]/
> data> \x00
> No match
> data> \xff
> No match
> data> \x80
> No match
> data>
>
> It does not match any character as shown by a few examples above.
It is exactly compatible with Perl, which gives the same result. Of
course, Perl is permanently in Unicode mode these days, whereas PCRE can
be in either, but I think that the above is still the correct behaviour.
It is not the only construct that always fails (it wouldn't always fail
in UTF-8 mode, of course). Constructs like (?!) also always fail.
Philip
--
Philip Hazel
--1750319812-1944530493-1225830869?6649--