日期:2014-05-20 浏览次数:20833 次
File tfile = new File("e:/info/sendto.txt");
FileInputStream tfis = null;
BufferedReader br = null;
String sendto = null;
try {
tfis = new FileInputStream(tfile);
InputStreamReader treader = new InputStreamReader(tfis);
BufferedReader tbr = new BufferedReader(treader );
sendto = tbr.readLine();
} catch (IOException e) {
}
email.addTo(""+sendto+"");
public static void main(String[] args) {
String s = "张三<zhangsan@qq.com>张三<zhangsan@qq.com>张三<zhangsan@qq.com>张三<zhangsan@qq.com>";
Matcher m = Pattern.compile("\\<(.+?)\\>").matcher(s);
while(m.find()){
System.out.println(m.group(1));
}
}