Use Python Regular Expressions to Process File Data

Offered By
Coursera Project Network
In this Guided Project, you will:

Implement a Python function that matches an email pattern.

Read from a file containing emails using Python and match each line.

Use Python Regular Expressions to replace missing email prefixes in a file.

Clock2 hours
IntermediateIntermediate
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

By the end of this project, you will use the python re package to create an application that verifies email form data from a file. Regular expressions are used to search for data patterns. They can be used to validate file or web data, and/or replace data when a match is found. In Python, the regular expression is compiled with a regular expression pattern. Then a string is passed to the regular expression engine where the search for the pattern match takes place. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

  • Email Validation
  • Python Regular Expression
  • Python Testing
  • Python Programming
  • Python File I/O

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Create a Python Regular Expression pattern test.

  2. Create strings to test a simple regular expression.

  3. Implement a Python function that matches an email pattern.

  4. Read from a file containing emails using Python and match each line.

  5. Use Python Regular Expressions to replace missing email prefixes in a file.

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.