Advanced Lesson 1
Regular Expressions
Chapter 8: Real world applications
Challenge 3 - Harvesting emails
You are given a made-up email. Download the file email.txt.
Read in the content of the email from the file.
Using regular expressions, print out the list of students and their emails as listed in the “To:” field.
Don Garrett, don.garrett@food.bz
Daryl Sears, daryl.sears@defg.com
Szymon Walmsley, szymon.walmsley@ijk.ac.uk
Frances Hurst, frances.hurst@silly.org
Teegan Moses, teegan.moses@silly.org
Klay Prentice, klay.prentice@abc.ac.uk
Campbell Bowden, campbell.bowden@pretty.edu
Karan Cuevas, karan.cuevas@pretty.edu
Heidi Gardner, heidi.gardner@somewhere.co.uk
Phoenix Mcclain, phoenix.mcclain@abc.ac.uk
Bertha Connor, bertha.connor@something.info
Kimberly Poole, kimberly.poole@email.net
Jamil Munro, jamil.munro@silly.org
Anton Britton, anton.britton@silly.org
Tasha Harvey, tasha.harvey@bba.com
Alexie Cantu, alexie.cantu@ijk.ac.uk
Philip Chung, philip.chung@pretty.edu
Kaisha Pearson, kaisha.pearson@food.bz
Malika Huber, malika.huber@bba.com
Jayce Aguilar, jayce.aguilar@abc.ac.uk