Be hated by the free world.
You never had any friends, and don't really want any anyways, and so you have decided to collect email addresses from web pages for direct e-mail advertising.
The text delivered to a web browser is usually marked up HTML, which may contain email addresses of the form:
The point of this problem is to extract and record the email addresses embedded in other text.
The input file will contain zero or more lines of ASCII text, for example:
column 111111111122222222223333333333444444444455555555556 123456789012345678901234567890123456789012345678901234567890 line 1:firstname.lastname@example.org wrote:[EOL] 2:>> What does <tt>x=7</tt> mean for this problem? For[EOL] 3:>> example,[EOL] 4:>>[EOL] 5:>> ..a@a@aa@aaa@aaa..a@a@aa@aaa@aaa..a@a..@a...a@..@..[EOL] 6:>>[EOL] 7:>> this scrolling @-example from email@example.com.[EOL] 8:>>[EOL] 9:>> <a href="mailto:Bobby@mail.bobsbanks.com">Bob</a>[EOL] :[EOF]
Other than the leader and trailer messages, the output file has each email address found in the input file in the order it was found (duplicates not removed).
The correct output corresponding to the example input file would be:
column 111111111122222222223 123456789012345678901234567890 line 1:Start of Spam Program[EOL] 2:firstname.lastname@example.org[EOL] 3:a@a[EOL] 4:a@aa[EOL] 5:aa@aaa[EOL] 6:aaa@aaa[EOL] 7:a@a[EOL] 8:a@aa[EOL] 9:aa@aaa[EOL] 10:aaa@aaa[EOL] 11:a@a[EOL] 12:email@example.com[EOL] 13:Bobby@mail.bobsbanks.com[EOL] 14:End of Spam Program[EOL] :[EOF]