Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

Re: [PHP] Regex problem II From: Andrei Zmievski (andrei <email protected>)
Date: 07/14/00

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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>