note 1824 deleted from function.ereg-replace by jimw

From: Date: Fri, 02 Nov 2001 01:41:23 +0000
Subject: note 1824 deleted from function.ereg-replace by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20172@lists.php.net to get a copy of this message
I may be missing something, but the following code on a Red Hat box: <PRE>$uptime = uptime; $uptime = eregi_replace("(.*up |, .[0-9] user.*)", "", $uptime); echo($uptime)</PRE> returns the uptime of the box, but the same code on a FreeBSD box doesn't parse it correctly. However, the following code does: <PRE>$uptime = uptime; $uptime = eregi_replace("(.*up |,.[0-9] user.*)", "", $uptime); echo($uptime)</PRE> Even though in both, the uptime command shows a space after the comma and before the user count... odd...

« previous php.notes (#20172) next »