Practical 9 - File Processing
Practical 9 - File Processing
1
Question 3: Email Address Extractor
Write a program that scans a text file for possible e-mail addresses and writes all
email address to an output file.
Addresses look like this:
• [email protected]
Notice that the address contains no spaces and has an @ sign followed by at least
one period (.). Programs such as this scan through web pages looking for e-mail
addresses that become the targets of spam. Because of this, many web pages
contain disguised e-mail addresses that can’t easily be automatically extracted.
Your program should find 12 email addresses in the text file emailText.txt.
Your code should write the following headers to the file headers.txt.