从文件中获取email
/**
? * 从文件中获取email
? * @throws Exception
? */
?public static void getMails() throws Exception {
??BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("f:1.txt"), "UTF-8"));
??String line = null;
??String mailreg = "\\w+@\\w+(\\.\\w+)+";
??Pattern p = Pattern.compile(mailreg);
??while (null != (line = br.readLine())) {
???Matcher m = p.matcher(line);
???while (m.find()) {
????System.out.println(m.group());
???}
??}
?}