Book Description
A regular expression (regex or regexp) is a sequence of characters that define a search pattern. It is an unofficial and free Regular Expressions book created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow.
This open book is licensed under a Creative Commons License (CC BY-SA). You can download Learning Regular Expressions ebook for free in PDF format (1.5 MB).
Table of Contents
Chapter 1
Getting started with Regular Expressions
Chapter 2
Anchor Characters: Caret (^)
Chapter 3
Anchor Characters: Dollar ($)
Chapter 4
Atomic Grouping
Chapter 5
Back reference
Chapter 6
Backtracking
Chapter 7
Capture Groups
Chapter 8
Character classes
Chapter 9
Escaping
Chapter 10
Greedy and Lazy quantifiers
Chapter 11
Lookahead and Lookbehind
Chapter 12
Match Reset: \K
Chapter 13
Matching Simple Patterns
Chapter 14
Named capture groups
Chapter 15
Password validation regex
Chapter 16
Possessive Quantifiers
Chapter 17
Recursion
Chapter 18
Regex modifiers (flags)
Chapter 19
Regex Pitfalls
Chapter 20
Regular Expression Engine Types
Chapter 21
Substitutions with Regular Expressions
Chapter 22
Useful Regex Showcase
Chapter 23
UTF-8 matchers: Letters, Marks, Punctuation etc.
Chapter 24
When you should NOT use Regular Expressions
Chapter 25
Word Boundary