Data School/Become a Regex Superhero

  • $69

Become a Regex Superhero

  • 48 Lessons

Solve tricky text problems and save the day with regular expressions in Python!

Have you ever wanted to be a Superhero? 💪

You can be!

Whether you need to extract data from log files, find and replace text using complex patterns, or build datasets from messy data sources, there's one tool that you need to know:

REGULAR EXPRESSIONS.

I know that regular expressions (also known as "regex") can be intimidating. It looks like a cryptic language composed of letters, numbers, dashes, dollar signs, backslashes, and other punctuation marks.

They are WAY too hard to learn... right?

You might as well just give up, and ask ChatGPT to write your regular expressions for you. (I mean, I'm SURE they will be correct.)

Or maybe... just maybe... there's a way to learn regular expressions that will actually make sense to you!

Imagine the benefits of being able to confidently write regular expressions:

  • You can build your own datasets from unstructured text sources like raw log files, HTML pages, PDF documents, OCR-generated text, and more.

  • You can clean and standardize your datasets faster.

  • You can find and replace text using sophisticated patterns.

  • You can extract more useful features for Machine Learning.

In short, you'll be a more versatile and valuable data scientist.

In this course, Become a Regex Superhero, we'll slowly build from the absolute basics of regular expressions all the way up to complex topics.

We'll take the time to practice everything we're learning, which will help to solidify each concept.

By the end of the course, you'll have gained a powerful skill that will significantly improve your ability to process and manipulate text data.

And the next time a (seemingly) impossible text processing problem arises, it will be YOUR turn to be the superhero!

Who should take this course?

This is the perfect course for you if:

  • You're new to regular expressions

  • You've written a few regular expressions, but you don't know if they're actually correct

  • You know the basics of regular expressions, but you want to get dramatically better

  • You have experience with regular expressions, but you want some extra practice

What topics are covered in the course?

  • Why learn regular expressions?

  • Basic rules and principles

  • Metacharacters

  • Character classes

  • Alternatives

  • Anchors

  • Greedy and lazy quantifiers

  • Match groups

  • Multi-line matching

  • Option flags

  • Searching with re.search

  • Substitution with re.sub

  • Splitting with re.split

  • Searching for multiple matches with re.findall

  • Improving performance with re.compile

  • Writing readable regular expressions with re.VERBOSE

If all of this terminology is new to you, that's okay!

What's included in the course?

  • 36 bite-sized video lessons
  • 7 sets of practical exercises
  • 6 detailed solution walkthroughs
  • 6 real-world datasets
  • 2 comprehensive reference notebooks
  • Links to my recommended resources
  • Certificate of completion at the end of the course
  • Lifetime access to everything

Thanks again for another great course! You managed to simplify complex concepts. I liked learning the big picture of regular expressions and then applying that to Python.

The exercises were great in bolstering my knowledge, and I enjoyed the walkthrough you did with the homework exercises.

- Rachel Zhande (Biochemist)

FAQs

What do I need to know before the course?

You don't need to have any experience with regular expressions! I will start with the absolute basics, and we will build up slowly to more complex topics.

However, you do need to know how to write basic Python code. If you're new to Python (or just need a refresher), I recommend also enrolling in Python Essentials for Data Scientists.

What software do I need to install?

The primary module used in the course is the re module, which is included with Python. However, a few of the exercises require the pandas library, which you will need to install.

Which Python version do I need?

You can use any version of Python 2 or Python 3.

Which Python editor can I use?

I use the Jupyter notebook throughout the course, though you can use any Python editor you like. If you want to install Jupyter, I recommend downloading the free Anaconda distribution (which includes pandas).

Alternatively, you could use Google Colab. Colab is free, runs entirely in your browser, provides you with a Jupyter-like interface, and includes both re and pandas. However, you will sometimes need to upload the course data files into Colab, and the files will be deleted by Colab at the end of every session.

How long is the course?

You can complete the video lessons in about 3 hours. However, you should budget a minimum of 3 additional hours to complete the exercises, homework assignments, and review the reference notebooks.

What if I need help during the course?

You can post a question below any lesson, and I'll do my best to respond!

How do I earn a certificate of completion?

Once you've watched all of the lessons and attempted all of the exercises, you can request a certificate of completion.

How long will I have access to the course?

You will have lifetime access to the videos, exercises, homework assignments, reference notebooks, and datasets.

Do you offer any discounts?

Yes! I offer Purchasing Power Parity discounts (also known as location-based discounts) for all of my paid courses. If you're located in one of the 160+ qualifying countries, you should automatically see a discount code at the top of this page.

I also offer student discounts and hardship-based discounts, regardless of where you live. Please email me at kevin@dataschool.io and I'd be happy to send you the appropriate discount code.

What's your refund policy?

If you decide that the course isn't a good fit for you, I'd be happy to give you a full refund within 30 days of purchase.

I have another question...

Please email me at kevin@dataschool.io and I'd be happy to answer your question!

I stumbled upon one of Kevin’s pandas YouTube videos a couple of years ago and I was instantly hooked. The live coding and clear, concise explanations in the videos made learning pandas easy. I subscribed to the channel and never looked back.

When I received his email about an upcoming regex course, the timing could not have been better. I was wrestling with regular expressions sprinkled throughout the pandas ecosystem. I signed up for the course and was not disappointed!

Again, the videos delivered, I learned the basics and much more. I can now read the (sometimes cryptic looking) regular expressions and build my own. Thanks for putting this course together, can’t wait for your next course.

- Rick Wheeler (GIS Instructor)

Course Outline

Introduction

8 minutes

Welcome to the course!
Download the course files
Why learn regular expressions?
Preview
Motivating example
Preview
Course methodology
Preview

Basic Regular Expressions

76 minutes

Rules for searching
Metacharacters
Quantifiers
Greedy quantifiers
Regular expressions in Python
Exercise 1
Exercise 1 solution
Match groups
Exercise 2
Exercise 2 solution
Character classes
Find multiple matches
Q&A

Basic Homework

25 minutes
Homework instructions
Homework 1 solution
Additional quantifiers
Homework 1 bonus
Homework 2 solution

Intermission

Can I ask you a quick favor?

Intermediate Regular Expressions

73 minutes

Lazy quantifiers
Alternatives
Option: Ignore case
Substitution
Anchors
Option: Multiline
Exercise 1
Exercise 1 solution
Option: Verbose
Exercise 2
Exercise 2 solution
Compile expressions
Return match position
Split strings
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 expressions
Request your certificate of completion
Take another course from Data School!
Earn money by promoting Data School's courses!

Just completed the course. It was great: informative, well thought-out and practical. I'm sure I will be able to apply this in my work very soon.

- Bruno DiGiorgi (Project Manager)

Are you ready to solve tricky text problems?

Are you ready to extract useful data from log files, HTML pages, and OCR-generated text?

Are you ready to clean and standardize your data faster and more accurately, and build your own datasets from messy data sources?

Then you'll want to enroll in Become a Regex Superhero!

Sure, you could choose not to sign up. Maybe you'll make the time to learn it all on your own... but given the complexity of regular expressions, that can be challenging and time-consuming.

You could try to follow one of the many free resources out there, but honestly, I've never found one that teaches regular expressions in the same clear, thorough, and step-by-step manner as this course.

I know that in these uncertain times, it can be hard to invest in yourself.

But think about it: Your time is valuable, and if you learn just one technique that saves you time, then your investment will be worth it!

If you're ready to add regular expressions to your toolbox and become a more valuable Data Scientist, then click the button below to get instant access.

I'll see you in the course!

- Kevin

👋 Welcome to Data School!

My name is Kevin, and I've taught Data Science in Python to over a million students.

My courses explain data science topics in a clear, thorough, and step-by-step manner.

I'd love to teach you, regardless of your educational background or professional experience.

Thanks for joining me! 🙌