提取文件中的所有Hotmail电子邮件地址并存储在单独的文件中 [英] extract all hotmail email addresses in a file and store in separatefile

查看:71
本文介绍了提取文件中的所有Hotmail电子邮件地址并存储在单独的文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本文件,其中包含一个电子邮件地址列表,例如

这个:


" fo*@yahoo.com"

" to *@hotmail.com"

" je *** @ gmail.com"

" to *** @ apple.com"


我喜欢


1.去除b $每个字符都留下

的电子邮件地址。

2.提取出hotmail地址并将其存储到另一个文件中。

原始文件中的hotmail地址将被删除。


感谢您的帮助

Hi, I have a text file that contents a list of email addresses like
this:

"fo*@yahoo.com"
"to*@hotmail.com"
"je***@gmail.com"
"to***@apple.com"

I like to

1. Strip out the " characters and just leave the email addresses on
each line.
2. extract out the hotmail addresses and store it into another file.
The hotmail addresses in the original file would be deleted.

Thanks for any help

推荐答案

6月18日,3:33 pm,Dennis< dcho ... @ gmail.comwrote:
On Jun 18, 3:33 pm, Dennis <dcho...@gmail.comwrote:

您好,我有一个文本文件,其中包含一些电子邮件地址列表,如

这个:


" f ... @ yahoo.com"

" t ... @ hotmail.com" ;

" je ... @ gmail.com"

" to ... @ apple.com"


我喜欢


1.删除每个字符都留下

的电子邮件地址。

2.提取出hotmail地址并将其存储到另一个文件中。

原始文件中的hotmail地址将被删除。


感谢您的帮助
Hi, I have a text file that contents a list of email addresses like
this:

"f...@yahoo.com"
"t...@hotmail.com"
"je...@gmail.com"
"to...@apple.com"

I like to

1. Strip out the " characters and just leave the email addresses on
each line.
2. extract out the hotmail addresses and store it into another file.
The hotmail addresses in the original file would be deleted.

Thanks for any help



打开INFILE,"< all_emails .txt" ;;

打开HOTMAIL,"> hotmail_only.txt";

打开NOTHOTMAIL,"> not_hotmail.txt";

while(< INFILE>)

{

open INFILE, "<all_emails.txt";
open HOTMAIL, ">hotmail_only.txt";
open NOTHOTMAIL, ">not_hotmail.txt";
while(<INFILE>)
{


_ = ~s /" // g;

打印HOTMAIL如果
_ =~ s/"//g;
print HOTMAIL if


_ =〜/ hotmail / i;

打印NOTHOTMAIL如果
_ =~ /hotmail/i;
print NOTHOTMAIL if


这篇关于提取文件中的所有Hotmail电子邮件地址并存储在单独的文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆