Bug #11064 Updated: ereg() doe's not accept the third argument as reported in doc
| From: | sniper@php.net | Date: | Wed, 23 May 2001 23:56:58 +0000 |
| Subject: | Bug #11064 Updated: ereg() doe's not accept the third argument as reported in doc | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56565@lists.php.net to get a copy of this message | ||
ID: 11064
Updated by: sniper
Reported By: jmt@freeshell.org
Old-Status: Open
Status: Closed
Bug Type: Regexps related
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
And what should happen? You try this:
<?php
$date = date("Y-m-d");
if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) {
echo "$regs[3].$regs[2].$regs[1]";
} else {
echo "Invalid date format: $date";
}
?>
Works for me just fine.
Previous Comments:
---------------------------------------------------------------------------
[2001-05-23 16:54:07] jmt@freeshell.org
try this :
ereg( $a, $b, $c );
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11064&edit=2