I think you'd have to read the file into a var first or run some cmd(). To read into a file, do $postEreg = ereg_replace("||", "", implode("", file($fileName)));
But I've seen a lot of stuff that says str_replace is a lot faster than ereg_replace. Your regexp is simple enough in the example you gave that you should concider it.