Re: preg_replace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/01/2013 08:06 AM, leam hall wrote:
Despite my best efforts to ignore preg_replace, it seems the best answer
for the current problem. That is, if I can get it to work...

Problem code:

         $remove = "TAG000000-";
         $replaceWith = "";
         $newTitle = preg_replace($remove, $replaceWith, $title);

This, as well as using the $remove and $replaceWith as themselves and not
variables, gives:

PHP Warning:  preg_replace(): Delimiter must not be alphanumeric or
backslash

Thoughts?

Leam


Can you offer a working example of the actual data you are working with and what you expect to happen? Besides preg_replace, what have you tried and what didn't work as expected?

--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux