设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 办公软件 >> Outlook >> 从outlook导入email地址
精品推荐
Outlook点击TOP10
·OutLook Express邮件数据备份和恢复
·Outlook add-in 插件.Net开发经验
·如何使用Outlook Express拒收邮件
·邮件群发 我要与众不同 Outlook群发新主张
·用OutLook登陆Yahoo的1G邮箱
·硬盘空间不够 可能是Outlook Express惹的祸
·Outlook Add-in(COM加载项)技术指南(四)
·C#设计界面(office2003,VS。net IDE,OutLook 等等)
·五招搞定Outlook2003群发邮件功能
·取得的Outlook目录并在TTreeView里显示出来
办公软件点击TOP10
·Word公式编辑器快速上手指南
·轻松破解Word与Excel的文档密码
·巧用Word 2007制作发文件用的方格稿纸
·三步搞定幻灯片:Powerpoint 2007应用实例
·在Excel 2007中快速创建专业化的图表
·Excel填空型下划线的使用
·揪出Word工具中隐藏的秘密
·学PowerPoint模板技巧 提高制作效率
·Excel隔行调整行高的四种有效方法
·在Excel 2007中导入或导出文本文件
精选专题

从outlook导入email地址

作者: 来源:网络文章 时间:2005-12-16 22:35:17

从outlook导入email地址(1)

Outlook有一种email地址格式,采用逗号分隔开字段,扩展名叫CSV。
例如:
"姓名","称谓","单位名称","部门","职务","邮政地址","邮政编码","电话","传真","统一编码","其他电话","单位其他","移动电话","呼机","主页","电子邮件","备注"

程序打开文件,每行读取
只用第一个逗号前的字符串作为姓名,email地址匹配格式取第一个(位置无关)
于是写下粗陋程序:
 private static final String repmail ="([\\w.-]+[@]{1}((\\w)+[.]){1,3}(\\w)+)";
 private static final String repname =".+?,";
 Pattern mailPattern = Pattern.compile(repmail );
  Pattern namePattern = Pattern.compile(repname);


  File file = new File("test.CSV");
  FileInputStream is = new FileInputStream(file);
  BufferedReader br = new BufferedReader(new InputStreamReader(is));
        String input = null;
  ArrayList list = new ArrayList();
   while((input = br.readLine())!=null){
    Matcher matchermail = mailPattern.matcher(input);
    Matcher matchername = namePattern.matcher(input);
    String[] card = new String[2];
    if(matchername.find()){
      card[0] = matchername.group(0).replaceAll("\"","");
    }
       if(matchermail.find()){
         card[1] = matchermail.group(0);
    }

共2页 9 7 [1] [28 :>

从outlook导入email地址 相关文章:
从outlook导入email地址 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com