Bug #13822 Updated: ereg vs eregi

From: Date: Sat, 10 Nov 2001 20:41:22 +0000
Subject: Bug #13822 Updated: ereg vs eregi
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-70022@lists.php.net to get a copy of this message
ID: 13822 Updated by: sander Reported By: mick@nederland.net Old Status: Duplicate Status: Closed Bug Type: Regexps related Operating System: Linux PHP Version: 4.0.6 New Comment: I meant closed :) Previous Comments: ------------------------------------------------------------------------ [2001-11-10 15:39:06] sander@php.net Works fine for me. ------------------------------------------------------------------------ [2001-10-25 08:29:11] mick@nederland.net We have build a function to convert iso to euro dates, therefor we use regular expressions. The code shows a line needed for a boolean return wether or not the date is in iso style. if(!ereg("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})$", $iso_time, $regs)) The ereg version is working perfectly, however the eregi version will fail 9 out of 10 times. Installed modules: './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--with-dom' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-ttf' '--with-zlib' '--with-db3' '--with-gdbm' '--with-openssl' '--with-layout=GNU' '--with-universe=/opt/mico-2.3.5' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--enable-wddx' '--without-mysql' '--without-unixODBC' '--without-oracle' '--without-oci8' '--with-pspell' '--with-xml' ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13822&edit=1

« previous php.dev (#70022) next »