note 14298 deleted from function.ereg by jimw

From: Date: Fri, 02 Nov 2001 01:28:35 +0000
Subject: note 14298 deleted from function.ereg by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20152@lists.php.net to get a copy of this message
Don't forget that '\' is a special character for regular expressions. Not only do you have to escape it for the strings you also need to escape it for the regexp. So if you want to match lines that start with "\" you would need to use: ereg("^\\\\(.*)", $mystring, $reg) AND NOT ereg("^\\(.*)", $mystring, $reg) as it may appear at first glance.

« previous php.notes (#20152) next »