Motivating example

Motivating example

Notes:

  • If you want to follow along, the homicides.txt file is available in the "data" directory of the zip file.

  • This is the only time in the course that I use the command line, and it's not important (for this course) that you learn the commands I'm using.

  • If you're interested in the command line, you can check out this command line reference that I created.

Become a Regex Superhero

Buy nowLearn more

Introduction

  • Welcome to the course!8
  • Download the course files
  • Why learn regular expressions?
  • Motivating example4
  • Course methodology

Basic Regular Expressions

  • Rules for searching2
  • Metacharacters4
  • Quantifiers
  • Greedy quantifiers
  • Regular expressions in Python
  • Exercise 1
  • Exercise 1 solution3
  • Match groups4
  • Exercise 2
  • Exercise 2 solution
  • Character classes
  • Find multiple matches
  • Q&A

Basic Homework

  • Homework instructions
  • Homework 1 solution
  • Additional quantifiers
  • Homework 1 bonus
  • Homework 2 solution

Intermission

  • Can I ask you a quick favor?

Intermediate Regular Expressions

  • Lazy quantifiers
  • Alternatives
  • Option: Ignore case3
  • Substitution
  • Anchors
  • Option: Multiline
  • Exercise 1
  • Exercise 1 solution
  • Option: Verbose2
  • Exercise 2
  • Exercise 2 solution
  • Compile expressions
  • Return match position
  • Split strings2
  • Useful features in regex101
  • Final thoughts

Intermediate Homework

  • Homework instructions
  • Homework solution

Conclusion

  • Can I ask you a quick favor?
  • Recommended resources
  • Tools that support regular expressions2
  • Request your certificate of completion
  • Take another course from Data School!
  • Earn money by promoting Data School's courses!