Re: POSIX regex

From: Date: Mon, 16 Jul 2007 13:10:05 +0000
Subject: Re: POSIX regex
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-30970@lists.php.net to get a copy of this message
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? 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. -- - Peter Brodersen

« previous php.internals (#30970) next »