Re: [PHP-LANG] preg_replace warning (newbie question)

[email protected] (Rasmus Lerdorf) Tue, 13 Aug 2002 11:43:24 -0700 (PDT)
Newsgroups php.lang
Message-ID <[email protected]>
You need \\\\
But wouldn't it be easier just to use stripslashes()?

On Tue, 13 Aug 2002, Michael Iatrou wrote:

>
> I am trying to get rid of a backslash (\) in a string.
> To do this I am using preg_replace like below
>
> preg_replace ("/\\/", "",$string);
>
> (according to the php manual)
>
> and I get this message
>
> Warning: No ending delimiter '/' found <file> on line <line>
>
> Whats wrong?
> Thanks in advance.
>
>
> --
> PHP Language Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>