Re: Regex problem II

From: Date: Fri, 14 Jul 2000 14:27:58 +0000
Subject: Re: Regex problem II
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6643@lists.php.net to get a copy of this message
On Fri, 14 Jul 2000, Javier Leyba wrote: > Hi All ! > > I need to do preg_match("s/^\+//", $token), but when I did it, I received the message > "Delimiter must not be alphanumeric or backslash in /www/new/index1.php on line 97" and > manual say "Any character can be used for delimiter as long as it's not alphanumeric or > backslash (\). If the delimiter character has to be used in the expression itself, it needs to be > escaped by backslash". > > But I said: how can I escape the invalid char with backslash if the delimiter can't be > backslash ??? > > It's crazy !!! :) Use preg_replace() instead. -Andrei "Freedom comes when you learn to let go. Creation comes when you learn to say no." -madonna

« previous php.general (#6643) next »