Page 1 of 1

ereg_replace and " ' [ ] \ characters

Posted: Wed Aug 20, 2008 6:28 am
by Sindarin
I have read about ereg_replace. I managed to make it work, but how do I replace " ' \ [ ] characters? They seem to conflict with the script.

Re: ereg_replace and " ' [ ] \ characters

Posted: Wed Aug 20, 2008 9:36 am
by ghurtado
You have to escape them with a backslash

Re: ereg_replace and " ' [ ] \ characters

Posted: Wed Aug 20, 2008 9:45 am
by JAB Creations
For future references you'll want to use the Regex forums for regex posts. :P

Re: ereg_replace and " ' [ ] \ characters

Posted: Wed Aug 20, 2008 1:35 pm
by Sindarin
For future references you'll want to use the Regex forums for regex posts. :P
Is there a whole forum for that? 8O
You have to escape them with a backslash
Like if I want to escape [ then I will have to do \[ ?

Re: ereg_replace and " ' [ ] \ characters

Posted: Wed Aug 20, 2008 2:16 pm
by ghurtado
Yeah, exactly: \[