Bug #17632 Updated: ereg doesn't work correctly with (

From: Date: Fri, 07 Jun 2002 00:19:03 +0000
Subject: Bug #17632 Updated: ereg doesn't work correctly with (
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9680@lists.php.net to get a copy of this message
ID: 17632 Updated by: torben@php.net Reported By: jesse@erieonline.com Status: Bogus Bug Type: Unknown/Other Function Operating System: Freebsd 4.5 PHP Version: 4.2.1 New Comment: Please read the docs on escapes in strings, and on regular expression syntax--it'll explain why your code didn't work. http://www.php.net/manual/en/language.types.string.php http://www.php.net/manual/en/ref.regex.php Hope this helps, Torben Previous Comments: ------------------------------------------------------------------------ [2002-06-06 16:15:28] jesse@erieonline.com Using the '\(' didn't work either, but I worked around the problem using a different method. ------------------------------------------------------------------------ [2002-06-06 15:49:44] mfischer@php.net Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. How about escaping it with '\' ? ------------------------------------------------------------------------ [2002-06-06 15:43:40] jesse@erieonline.com After doing work using the ereg function, I've discovered that the function doesn't care for '('. Everytime it is used, php will produce a warning message. If I remove the '(', the function will work, but as soon as I add it back in, the warnings reapper. if (ereg("> (", $line)) { Warning: REG_EPAREN in /usr/home/grimreapa.com/public_html/emailparse.php on line 5 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17632&edit=1

« previous php.bugs (#9680) next »