Preg_replace() Delimiter problem

You’re back to not quoting strings properly, exactly the same problem that you ran into in your post about why fopen wouldn’t work if you didn’t quote the filename properly.