Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31315 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98063 invoked by uid 1010); 30 Jul 2007 07:23:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 97996 invoked from network); 30 Jul 2007 07:23:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2007 07:23:35 -0000 Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:2715] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 69/20-29536-9C19DA64 for ; Mon, 30 Jul 2007 03:23:05 -0400 Received: (qmail 65395 invoked by uid 98); 30 Jul 2007 07:22:45 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.01 (clamdscan: 0.88.7/3804. Clear:RC:1(127.0.0.1):. Processed in 0.091336 secs); 30 Jul 2007 07:22:45 -0000 Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 30 Jul 2007 07:22:45 -0000 Received: from 24.12.13.192 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Mon, 30 Jul 2007 02:22:45 -0500 (CDT) Message-ID: <3514.24.12.13.192.1185780165.squirrel@www.l-i-e.com> In-Reply-To: <1184590056.3352.10.camel@localhost.localdomain> References: <1184590056.3352.10.camel@localhost.localdomain> Date: Mon, 30 Jul 2007 02:22:45 -0500 (CDT) To: jani.taskinen@iki.fi Cc: internals@lists.php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] POSIX regex [PATCH] From: ceo@l-i-e.com ("Richard Lynch") On Mon, July 16, 2007 7:47 am, Jani Taskinen wrote: > Now only places using the POSIX regex functions (ext/ereg/ excluded) > are > ext/standard/browscap.c and ext/pgsql/pgsql.c. For your review, my first patch (!) along with a php test case, of course, in a URL/directory structure that should be familiar: http://l-i-e.com/php5/ext/pgsql/ :-) The commit comment should probably have something not unlike this: Use PCRE instead of POSIX regex Remove stray closing parenthesis in PG_TIME pattern Real Hackers can snag the patch and play with it and hit 'delete' now. Regarding the test case... The existing pg_convert test case only tested 3 conversions and there are/were 9 PCRE/POSIX-regex non-trivial conversions. I didn't really want to mess with adding a bunch of columns to the existing test table, potentially messing up a bunch of other test scripts, so just created/dropped my own table to hit all 9 PCREs I hacked. There are many other conversions, actually, but they mostly consist of no-op or typecasting an int to a string with no actual change, or adding apostrophes around a value to make it DB-ready, and I didn't touch those anyway, so they should be no less broken than they were before. I am, of course, 100% open to critiques, comments, or derogatory remarks. :-) PS The function was and probably should remain experimental in the docs, I guess... Though I am pretty sure I did excise one bug with that stray paren. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?