Bug #14723 Updated: ereg doesn't match correct
| From: | sow dot olivier at alias dot fr | Date: | Thu, 27 Dec 2001 18:18:19 +0000 |
| Subject: | Bug #14723 Updated: ereg doesn't match correct | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-75134@lists.php.net to get a copy of this message | ||
ID: 14723
User updated by: sow.olivier@alias.fr
Reported By: sow.olivier@alias.fr
Status: Bogus
Bug Type: *Regular Expressions
Operating System: WIN2K
PHP Version: 4.0.5
New Comment:
sorry, i finally found my error
i look result on HTML page and there are more than one space between each word, in HTML page some
space look like one space ;(
thanx for your help
Previous Comments:
------------------------------------------------------------------------
[2001-12-27 13:01:21] mfischer@php.net
Please ask support questions at php-general@lists.php.net .
Hint: You may want to use preg_match or even skip the regex part and use explode/split on
(white)spaces.
------------------------------------------------------------------------
[2001-12-27 10:26:49] sow.olivier@alias.fr
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 this bug report at http://bugs.php.net/?id=14723&edit=1