English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 3h 21m | 1.21 GB
Learn regular expression fundamentals, or expand your existing skills
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.
What you’ll learn
- 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
Table of Contents
Introduction
1 What is a Regular Expression
2 Regular Expression Readability
3 Course Tools
4 Links Referenced in Course Content
5 Ask me questions!
6 Requested Information for Questions
Explicit Characters and Quantifiers
7 Explicit Characters
8 Introduction to Quantifiers
9 More Quantifier Examples
10 Escaping Special Characters
11 Curly Brace { } Quantifiers
12 Natural Curiosity
13 Regex101 Exercises for Explicit Characters and Quantifiers
Collections, Character Ranges, and Negation
14 Collections
15 Character Ranges
16 Negation
17 Regex101 Exercises for Collections, Character Ranges and Negation
Whitespace Characters and String Boundaries
18 Backslash Revisited
19 Specifying Whitespace Characters
20 Introduction to String Boundaries
21 Example Anchoring to Start of String
22 Example Anchoring to Both Ends of String
23 Regex101 Exercises for Whitespace Characters and String Boundaries
Character Classes
24 Whitespace Character Classes
25 Other Character Classes
26 Word Boundary Characters
27 b vs W
28 Another Character Class Example
29 Regex101 Exercises for Character Classes
Flags
30 Introduction to Flags
31 Flags Syntax
32 Example without Flags
33 Multi-Line and Global flags
34 Case-Insensitive and Single-Line flags
35 IMPORTANT Some JavaScript Exercises not available due to Udemy limitations
36 Regex101 Exercises for Flags
Greedy vs. Lazy Quantifiers
37 Introduction to Greedy vs. Lazy Quantifiers
38 Useful Lazy Quantifier Example
39 Greedy Quantifier Example
40 Lazy Quantifier Syntax
41 Useless Lazy Quantifier Examples
42 Lazy Quantifier vs. Negated Collection
43 Regex101 Exercises for Greedy vs. Lazy
Multi-Character Strings Quantifiers and Options
44 Multi-Character String Options for Full Regex
45 Groups with Multi-Character Strings
46 Kittens Three Ways
47 Collections within Groups
48 Complex Multi-Character Example 24 hr Clock Display
49 Regex101 Exercises for Multi-Character Strings Quantifiers and Options
Capture Groups
50 Introduction to Capture Groups
51 Non-Capturing Groups
52 Numbered Capture Groups
53 Named Capture Groups
54 Regex101 Exercises for Capture Groups
Substitution (Replace)
55 Replace with Fixed String
56 Reference Group in Replacement
57 Remove Regular Expression Matches from String
58 Regex101 Exercises for Substitution
Lookarounds
59 Introduction to Lookarounds
60 Positive Lookbehind Example
61 Negative Lookbehind Example
62 Lookaround Platform Support
63 Positive Lookahead Example
64 Negative Lookahead Example
65 Notes on Exercises
66 IMPORTANT Lookaround JavaScript Exercises not available (Udemy limitations)
67 Regex101 Exercises for Lookarounds
Thank You!
68 Thank You!
Resolve the captcha to access the links!