На пыхе PHP: $filee=file_get_contents("путь к своему тхт"); $file="b.txt"; preg_match_all("#[a-zA-Z0-9\._-]{1,15}+@[a-zA-Z0-9]{1,10}\.[a-zA-Z0-9]{1,4}#",$filee, $pxp); $s=fopen($file, "a+"); foreach ($pxp[0] as $out) {fwrite($s, $out. "\r\n");} fclose($s);