Forum Moderators: coopster

Message Too Old, No Replies

php preg_replace problem

I have battled but it has beaten me

         

proper_bo

3:25 pm on Aug 2, 2005 (gmt 0)

10+ Year Member



I am just trying to use preg_replace to replace

/films/blah/blah

with

http://www.example.com/films/blah/blah

So I can just replace the films/ bit yeah?

I have tried so hard to work it out but it has beaten me. I am sure many of you will know it straight away and save my time.

Thank you.

coopster

12:18 am on Aug 3, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Why not just append your string to the front of it as opposed to using a regular expression? Or are you trying to locate this in a string somewhere? Can you offer a bit more in your example?