I know you have already done it, but I decided to write some code anyhow.
Code:
<?
$file = "C:\Windows\Desktop\untitled.txt";
$content = implode('',file($file));
$content = preg_replace("/([^\s]*)[^\n]*/","\\1",$content);
$out = fopen($file, "w");
fputs($out,$content);
fclose($out);
print $content;
?>
Freddy, since the date is on the line, I am thinking that each line contains different dates, so having:
str_replace("Email from plus one online Sun 12/31/00 6:22 PM","", $file[$i]);
would only affect one line most likely. Not sure is str_replace() would be the best function to use than, because I don't think it can handle complex string patterns? (I could always be wrong about that though)
Bookmarks