PHP 4.0 Bug #4199: Regular Expression functions do not seem to work with spaces
| From: | tim at orotech dot com | Date: | Thu, 20 Apr 2000 15:43:40 +0000 |
| Subject: | PHP 4.0 Bug #4199: Regular Expression functions do not seem to work with spaces | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18056@lists.php.net to get a copy of this message | ||
From: tim@orotech.com
Operating system: Soliars 7
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Misbehaving function
Bug description: Regular Expression functions do not seem to work with spaces
I am using php4 RC1 to parse a file that is uploaded from a user.
file opens correctly, and all other characters are taken out when I use either ereg_replace or
eregi_replace. However,
trim($str)
ltrim($str)
fail to remove the beginning and trailing whitespaces.
eregi_replace(" ", "", $str)
ereg_replace(" ", "", $str)
eregi_replace("[[:space:]]", "", $str)
ereg_replace("[[:space:]]", "", $str)
these also fail to remove a space at the beginning of a string that I'm reading from an
uploaded text file.
I'm running:
System: SunOS jasonwolfe.com 5.7 Generic_106541-10 sun4c sparc SUNW,Sun_4_75
Apache 1.3.12
MySQL 3.22.32