Your regular expression looks about right, except you don't need the slashes on the replacement part. Also, you could use [man]str_replace[/man] instead of [man]preg_replace[/man] because you know the exact string you'll be replacing.
This all requires that $search_file contains the contents of the file.
Also (and this is probably the problem) you need to assign the return value of preg_replace/str_replace back to $search_file. If you do this:
preg_replace('/search/', 'replace', $search_file);
Nothing will happen. You need to do it like this instead:
$search_file = preg_replace('/search/', 'replace', $search_file);