Click here to get back home

extract all hotmail email addresses in a file and store in separate file

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
extract all hotmail email addresses in a file and store in separate file Dennis 06-18-2008
Posted by szr on June 20, 2008, 4:59 pm
Please log in for more thread options
Martijn Lievaart wrote:
> On Fri, 20 Jun 2008 11:32:27 +0200, Dr.Ruud wrote:
>
>> Martijn Lievaart schreef:
>>> On Thu, 19 Jun 2008 08:38:40 +0200, Martijn Lievaart wrote:
>>
>>>> perl -nie 'if (/\@hotmail.com@$/) { s/"//g; print; }' text_file
>>>
>>> Or even:
>>>
>>> perl -nie 's/"//g; print if /\@hotmail.com@$/' text_file
>>
>> Don't you mean this?
>>
>> perl -ne 's/"//g; print if /\@hotmail\./' text_file
>
> I think I ment this:
>
> perl -ni -e 's/"//g; print if /\@hotmail.com@$/' text_file
>
> (-i makes a backup, -ie probably takes the 'e' as the backup suffix.)

Maybe I'm missing something, but I don't understand why you have an @
near the end of your regex just before the $ ? I can't find any mention
of it in perldoc or my Perl Pocket Refererence, but it's possible I'm
missing something.

Thanks.

--
szr



Posted by Martijn Lievaart on June 20, 2008, 5:40 pm
Please log in for more thread options
On Fri, 20 Jun 2008 13:59:05 -0700, szr wrote:

> Maybe I'm missing something, but I don't understand why you have an @
> near the end of your regex just before the $ ? I can't find any mention
> of it in perldoc or my Perl Pocket Refererence, but it's possible I'm
> missing something.

Your missing nothing. I'm blind.

M4

Similar ThreadsPosted
Regex for finding email addresses inside text file January 27, 2005, 1:44 am
how to separate all but www addresses? September 26, 2004, 1:41 pm
Validating email addresses August 10, 2004, 9:26 pm
parsing email addresses July 18, 2005, 10:32 pm
Regexp for email addresses. February 14, 2007, 4:55 pm
FAQ 4.65 How can I store a multidimensional array in a DBM file? May 12, 2005, 11:03 am
FAQ: How can I store a multidimensional array in a DBM file? October 10, 2004, 5:10 pm
FAQ 4.65 How can I store a multidimensional array in a DBM file? February 13, 2005, 12:03 am
FAQ 4.65 How can I store a multidimensional array in a DBM file? July 28, 2005, 10:03 am
FAQ 4.65 How can I store a multidimensional array in a DBM file? September 17, 2005, 10:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap