
Master practical regular expressions through example-driven lessons, cheat sheets, and quizzes that save you time. No prior knowledge is required; learn to solve text tasks and become go-to regex expert.
Explore how to use regex101 to test and understand regular expressions, including flavors, match vs substitution, global and multiline options, and the built-in debugger and quick reference.
Explore how regular expressions operate on a string, observe the matching steps, and use the rich x debugger to test matches and understand global flags.
Explore character classes in regular expressions, using digit and letter ranges, combining ranges, and negation to match non-alphanumeric characters, with spam email examples illustrating start and end of line anchors.
Explore regex shorthand for character classes, including \d and \D, \w and \W, \s and \S, the dot wildcard, outside-bracket use, and negation.
Explore how alternation and parentheses constrain regular expressions to match street name variants, using character classes to handle case differences and digits, and strings like First Street or Fourth Street.
Explore core regex concepts, including the start and end anchors, character classes vs alternation, ranges and negated classes, and common metacharacters like \d, \w, and \s to write concise patterns.
Explore quantifiers and ranges to count digit occurrences in phone numbers, using exact counts or ranges to match nine or ten digits across Portuguese and United States formats.
Explore optional quantifiers in regex, including making country codes and spaces optional with grouping and alternation, and learn greedy versus lazy behavior in matching numbers with or without codes.
Explore the zero or more quantifier (*) in regex, showing how it matches different digit counts, and learn when to use the asterisk and the dot and asterisk pattern.
Explore greediness and laziness in regex quantifiers, showing how greedy quantifiers match as much as possible while lazy ones stop early, with examples of star, plus, question mark, and ranges.
Capture text with capturing groups in parentheses and reuse it via backreferences in regular expressions to prevent duplicate words like cool cool.
Explore practical regex techniques to remove duplicate words across text, using word boundaries, backreferences, and flexible spacing. Apply global, case-insensitive matching to identify and merge repeated terms in long documents.
Learn to build a practical regular expression that identifies urls, including http or https, optional www, domain, extension up to six letters, and optional port.
Improve your regular expressions by simplifying the url matcher to accept valid urls, use optional patterns and question marks, escape slashes, and refine domain and extension rules.
Use practical regex techniques to extract valid HTML text from a web scraper example by matching opening and closing tags, tag names, attributes, and capturing groups with backreferences.
Develop a regex to match lines with either three or six or more comma-separated numbers, using digits, alternation, and grouped quantifiers, while anchoring the line and ensuring no trailing comma.
Explore lookaround in regex, including positive and negative lookahead and lookbehind, and learn how combining them enhances pattern matching beyond basic character classes.
Explore lookahead assertions in regex, testing a pattern without consuming text. See examples with 'man' in superhero names and movie strings, and learn how capturing groups inside assertions reuse matches.
Learn how positive lookbehind in regex allows matching digits that follow a specific currency, such as USD, and apply it to extract USD amounts from text.
Validate passwords with regex by enforcing 6–12 characters, at least one uppercase, one lowercase, one digit, and a special character using positive lookahead and negated classes.
Explore matching euro price decimals with two digits using lookbehind and lookahead, ensuring decimals appear after a dot and exclude zero and double zero.
Explore look ahead and look behind as zero-length assertions that do not capture, learn their positive and negative variants, and how capturing groups can appear inside lookarounds.
Lookaround Cheat Sheet
Celebrate completing the complete practical regular expressions course, apply regex to text and data, save time, and use cheat sheets and quizzes to reinforce learning.
Learn Regular Expressions (Regex) through practical examples, exercises, and real-world problems. This Regex tutorial focuses on helping you understand and write regular expressions instead of simply memorizing syntax.
You will start with the fundamentals and gradually learn how to build more advanced Regex patterns. Each concept is explained through practical examples, so you can see how regular expressions work and how to apply them to problems you may encounter in real development.
What you will learn
Regex syntax and the fundamentals of regular expressions
Character classes, ranges, and special characters
Quantifiers, anchors, and boundaries
Groups and capturing groups
Alternation and optional patterns
Greedy and lazy matching
Lookahead and lookbehind
Backreferences
Searching and matching text
Extracting information using Regex
Finding and replacing text
Validating data and common input formats
Building and understanding complex Regex patterns
Debugging and improving regular expressions
Instead of giving you a list of symbols to memorize, this course teaches you how to solve problems with Regex. You will work through practical examples and learn how to construct patterns step by step.
Whether you are a developer, programmer, QA engineer, DevOps engineer, data analyst, or beginner, this course will help you understand regular expressions and use them with confidence.
No previous Regex experience is required.
Stop memorizing Regex. Start solving problems with it.