Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30970 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29769 invoked by uid 1010); 16 Jul 2007 13:10:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29754 invoked from network); 16 Jul 2007 13:10:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2007 13:10:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=penguin@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=penguin@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 195.41.46.235 as permitted sender) X-PHP-List-Original-Sender: penguin@php.net X-Host-Fingerprint: 195.41.46.235 pfepa.post.tele.dk Linux 2.5 (sometimes 2.4) (4) Received: from [195.41.46.235] ([195.41.46.235:50072] helo=pfepa.post.tele.dk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/E0-22029-95E6B964 for ; Mon, 16 Jul 2007 09:10:51 -0400 Received: from workpenguin (0x5358bbb8.bynxx18.adsl-dhcp.tele.dk [83.88.187.184]) by pfepa.post.tele.dk (Postfix) with SMTP id 8ABBAFAC025; Mon, 16 Jul 2007 15:10:46 +0200 (CEST) To: jani.taskinen@iki.fi Cc: internals@lists.php.net Date: Mon, 16 Jul 2007 15:10:05 +0200 Message-ID: References: <1184590056.3352.10.camel@localhost.localdomain> In-Reply-To: <1184590056.3352.10.camel@localhost.localdomain> X-Mailer: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: POSIX regex From: penguin@php.net (Peter Brodersen) Hi, On Mon, 16 Jul 2007 15:47:36 +0300, in php.internals jani.taskinen@sci.fi (Jani Taskinen) wrote: >Now only places using the POSIX regex functions (ext/ereg/ excluded) are >ext/standard/browscap.c and ext/pgsql/pgsql.c. > >So what to do with these 2 places using the POSIX stuff? Convert them to >use PCRE functions or enable PCRE to be build with the POSIX compat >functions?=20 I would suggest just rewriting them to PCRE functions. According to 5.2.3 pgsql.c has nine explicit expressions. browscap.c builds regexes and has just one regex call. browscap.c does nothing special with regard to regular expressions (just converting glob-like tokes such as ? * . to . .* \. ). The expressions in pgsql.c seem pretty straight forward to me as well. It might be enough just to add delimiters to the expressions (and properly escape if the delimiter is present in the expression). I don't think it would take a long time to do. --=20 - Peter Brodersen