note 31982 added to function.ereg

From: Date: Sun, 11 May 2003 23:34:57 +0000
Subject: note 31982 added to function.ereg
Groups: php.notes 
Request: Send a blank email to php-notes+get-47850@lists.php.net to get a copy of this message
Like Sankyu, I spent half a day with whitespace as well. I was trying to get it to work in js and php. /s didn't work nor escaping a space. Finally I noticed a form validator written by mlemos had a working regex for email. All I did was keep the same order for the characters and it worked. The order seems to matter, this didn't work, and other derivatives such as \s \r\t\v ... [a-zA-Z0-9\._\-\ ] i.e. from his script: [-!#$%&'*+./0-9=?A-Z^_`a-z{|}~] so I need: [-.0-9A-Za-z_ ] or another example: [-#.0-9A-Za-z ] Just hope to save people hours on something that should be simple. -- http://www.php.net/manual/en/function.ereg.php http://master.php.net/manage/user-notes.php?action=edit+31982 http://master.php.net/manage/user-notes.php?action=delete+31982 http://master.php.net/manage/user-notes.php?action=reject+31982

« previous php.notes (#47850) next »