Page 1 of 1

remove all text between 2 values in a string

Posted: Sun Mar 14, 2010 10:14 am
by pcaines2
Hello All,

I want to remove all text between 2 values.

e.g: [pdf]remove text[-pdf]

displays

[pdf][-pdf]

I have tried everything and can't seem to get it to work.

Any help is appreciated

Thanks

Re: remove all text between 2 values in a string

Posted: Sun Mar 14, 2010 6:55 pm
by Christopher
Look at the documentation for preg_replace().