Have a question?
Message sent Close
4.62 out of 5
4.62
268 reviews on Udemy

Regular Expressions for Beginners and Beyond! With Exercises

Learn regular expression (regex) fundamentals, or expand your existing skills
Instructor:
Bonnie Schulkin
15,207 students enrolled
English [Auto]
Basic regular expression syntax
Tokens representing classes of characters
Using flags and greedy vs. lazy to fine-tune your regular expressions
Using groups for more advanced searching, plus replacing parts of strings
Lookahead and Lookbehind
All examples and exercises provided in JavaScript, Python and grep

Regular expressions have a bad reputation for being difficult to understand. This course introduces tools and a systematic approach so you can unlock the power of regular expressions to write compact, elegant code. 

Course Concepts

In this course, we will cover concepts from basic to advanced:

  • Quantifiers

  • Character collections, including negation

  • Character ranges

  • String boundaries

  • Character Classes

  • Flags

  • Greedy vs. Lazy Quantifiers

  • Multi-Character Quantifiers and Options

  • Capturing Groups (numbered and named)

  • Substitution / Replace

  • Lookahead and Lookbehind

Depending on your level of experience, you can start at the beginning, or start later with concepts you’ve always been interested in, but haven’t had a chance to learn yet.

Course Examples

Examples progress in a logical, narrative way. At the end of one example, we will think about how we might tweak it to do something similar but more powerful. In this way, the concepts flow naturally from one example to the next.

The course has 44 examples in the course of the lectures, each written out on different platforms (JavaScript / Python / Linux (grep)) in the course repository. Each regular expression is fully commented and has test cases to show how it’s intended to be used, so these are a great starting point if you like to “code by example” — start with an example you know works and tweak it for your purposes.

Course Exercises

There are also 46 exercises using Udemy’s code challenge platform. You are given a description of a regular expression, and then you write it using your choice of JavaScript or Python syntax. After you’re done, tests written especially for the exercises will let you know whether your regular expressions did the job they were supposed to. These exercises are a great way to cement the concepts in your brain, and make sure you really understand the material presented in the lectures.

Course Tools

The course uses regex101 (with permission of the author) to show how regular expressions match the test strings. There are also slides breaking down each regular expression example and explaining each piece.

Questions encouraged!

Please use the Q&A feature on Udemy to ask questions! I love to talk about why regular expressions don’t seem to be working, discussing decisions I made about course content, and debating regular expression philosophy.

You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.6
4.6 out of 5
268 Ratings

Detailed Rating

Stars 5
172
Stars 4
81
Stars 3
12
Stars 2
2
Stars 1
1
d317a34708efc981d4538fde9699d51d

Includes

3 hours on-demand video
26 articles
Certificate of Completion
This website uses cookies and asks your personal data to enhance your browsing experience. We are committed to protecting your privacy and ensuring your data is handled in compliance with the General Data Protection Regulation (GDPR).