Regular Expressions Tutorial
1.0
  • Regex Cheat Sheet
  • Exercises
  • The Basics
  • Regular Expressions Module
  • Grouping
  • Alternations & Substitutions
  • Advanced Features
  • Exercise Answers

Taught by Trey Hunner of Truthful Technology LLC. Practice Python weekly.

Regular Expressions Tutorial

PyCon 2021 Regular Expressions Tutorial

This tutorial teaching regular expressions in Python was taught remotely by Trey Hunner at PyCon 2021. Trey runs Python Morsels, an online Python skill-building service and hosts Python trainings for teams.

The Exercises page lists all exercises and all instructions for writing and testing the exercises. Feel free to consult the Regex Cheat Sheet when solving the exercises.

Contents

  • Regex Cheat Sheet
    • Regex Syntax
    • Python
  • Exercises
    • Testing Your Exercises
    • Intro Exercises
    • Substitution Exercises
  • The Basics
    • Raw Strings
    • Searching
    • Character Class
    • Anchors
    • Metacharacters
    • Quantifiers
    • Intro Exercises
  • Regular Expressions Module
    • Special Sequences
    • Word Boundaries
    • Repeats
    • Case Sensitivity
    • Searching
    • Multi-search
    • Validation and Search Exercises
  • Grouping
    • Grouping
    • Capture Groups
    • Uncapturing Groups
    • More Search Exercises
  • Alternations & Substitutions
    • Verbose Flag
    • Alternations
    • Basic Substitution
    • Normalization
    • Substitution Exercises
    • Alternation Exercises
  • Advanced Features
    • Using Captures in Substitutions
    • Using Captures
    • Split
    • Compiled
    • Greediness
    • Named Capture Groups
    • Substitution Functions
    • Lookahead
    • Negative Lookahead
  • Exercise Answers
    • Intro Exercises
    • Validation and Search Exercises
    • More Search Exercises
    • Substitution Exercises
    • Alternation Exercises
✕
↑
A Python Tip Every Week
Python Morsels logo

Need to fill-in gaps in your Python skills? I send weekly emails designed to do just that.


Next

© Copyright 2021 Truthful Technology, LLC.