import java.io.*;import java.util.regex.*;
/*** 抓取邮件* * @author JRunner* * 2009-10-30* * Email:JRunner@126*/public class EmailFetch {
/** * @param 入口 */public static void main(String[] args) {try {BufferedReader br = new BufferedReader(new FileReader("D:\\Java.mht"));String row = "";//比拟是是最后一行while ((row = br.readLine()) != null)parse(row);System.out.println("success...");
} catch (FileNotFoundException e) {e.printStackTrace();} catch (IOException e) {e.printStackTrace();}
}
// 读取并打印private static void parse(String row) {Pattern p = Patternpile("([\\w[.-]]+)@[\\w[.-]]+\\.[\\w]+");Matcher m = p.
ifsong旗舰店matcher(row);while (m.find()) {System.out.println(m.group(1));}}
}