- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- I need a perl or php script to extract all mail ad...
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Latin America
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-29-2005 03:38 AM
05-29-2005 03:38 AM
I need a perl or php script to extract all mail addresses from a homepage, but I have to know which mail address is on which HTML site or on which perl or php site.
I can run this perl script on the webserver machine locally.
kind regards
chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-29-2005 06:07 AM
05-29-2005 06:07 AM
SolutionTry this on for size.
wget http://www.mysite.com/index.html
# Replace it with a local file, it doesn't matter.
cat index.html | grep "@" > secondary file.
Nnow you have extracted every line with an @ into a file.
You are now quite close.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-29-2005 09:16 PM
05-29-2005 09:16 PM
Re: I need a perl or php script to extract all mail addresses
@Files_List contains list of files to be scanned through. you can also use File::Find module to traverse set of directories and get list of files.
#!/usr/bin/perl
foreach $file(@Files_List)
{
open(FH, "$file") || die "Cant open file";
while(
{
chomp($_);
#Following regular expression hopefully matches most of email id. only condition being that before the email id there should be atleast one space. it can match email id's containing alphanumeric, -, _ and .
if ($_ =~ m/\s*([-_.\w]+@[-_.\w]+)\s*.*$/g)
{
print ("->$file<- contains mail id ->$1<-\n");
}
}
}
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-30-2005 11:29 PM
05-30-2005 11:29 PM
Re: I need a perl or php script to extract all mail addresses
whether the above script is of help to you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-31-2005 12:12 AM
05-31-2005 12:12 AM
Re: I need a perl or php script to extract all mail addresses
Sorry I didn't check yet, have a lot of work now,
but I'll do next week and I'll report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-31-2005 12:16 AM
05-31-2005 12:16 AM
Re: I need a perl or php script to extract all mail addresses
here's a schell script which does the same (and some more). It's a piece from a script I use to send people "personal" emails.
The file it reads is called "list" change it to what you want.
Hope it helps.
Cheerio,
Renarios
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-31-2005 01:49 AM
05-31-2005 01:49 AM
Re: I need a perl or php script to extract all mail addresses
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP