[prev in list] [next in list] [prev in thread] [next in thread]
List: php-internals
Subject: Re: [PHP-DEV] POSIX regex [PATCH]
From: "Richard Lynch" <ceo () l-i-e ! com>
Date: 2007-07-30 7:22:45
Message-ID: 3514.24.12.13.192.1185780165.squirrel () www ! l-i-e ! com
[Download RAW message or body]
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?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic