Bug #14723: ereg doesn't match correct

From: Date: Thu, 27 Dec 2001 15:26:49 +0000
Subject: Bug #14723: ereg doesn't match correct
Groups: php.dev 
Request: Send a blank email to php-dev+get-75129@lists.php.net to get a copy of this message
From: sow.olivier@alias.fr Operating system: WIN2K PHP version: 4.0.5 PHP Bug Type: *Regular Expressions Bug description: ereg doesn't match correct I try to build an expression to get the File Name from a string given by ftp_rawlist() $pFile="-rwxrwxrwx 1 owner group 35087 Aug 13 1999 Copy of fupgrade.asf"; ereg("^.+ ([0-9]) .+ ([0-9]+) (.+) ([0-9][0-9]) ([0-9][0-9](:*)[0-9][0-9]) (.+)$",$pFile, $regs); this expression doesn't return match i try this one: ereg("^.+ ([0-9]) .+ ([0-9]+) (.+) ([0-9][0-9]) ([0-9]+) (.+)$",$pFile, $regs); but doesn't work too the first expression works on these string: "-rwxrwxrwx 1 owner group 3163 Dec 27 14:18 Read me & me.txt" "drwxrwxrwx 1 owner group 0 Dec 27 14:06 test2" but if i replace the hour by the year (as do ftp_rawlist()) that not work even with the second expression -- Edit bug report at: http://bugs.php.net/?id=14723&edit=1

« previous php.dev (#75129) next »