Skip to main content
WebsitebeginnerFree

regex101: Online Regex Tester and Debugger

regex101

A tool rather than a course, but its token explanations and backtracking debugger make it the practice environment every other resource here assumes. Free browser tool for writing and testing patterns against sample text. Explains each token in plain language, highlights capture groups, shows a step-by-step debugger of backtracking, and switches between PCRE, JavaScript, Python, Java, .NET, Go and Rust flavors.

Visit resource

More resources on Regular Expressions

PaperFree

Implementing Regular Expressions (Regular Expression Matching Can Be Simple And Fast, and sequels)

Russ Cox's article series on regex engine implementation. Shows why backtracking engines can take exponential time, how Thompson NFA simulation guarantees linear time, and how RE2 handles submatches and real-world features. Includes working C code. Primary source explaining the engine differences, and why catastrophic backtracking happens.

BookPaid

Mastering Regular Expressions, 3rd Edition

Jeffrey Friedl's book on how regex engines work and how to write efficient, correct patterns. Explains NFA versus DFA matching, backtracking, crafting and optimizing expressions, and covers Perl, Java, .NET and PHP specifics. Published 2006. Still the deepest treatment of engine mechanics and pattern efficiency; language chapters are dated but the core chapters are not.

WebsiteFree

Regular Expression HOWTO (Python Documentation)

Official Python guide to the re module by A.M. Kuchling. Walks through metacharacters, compiling patterns, match versus search, grouping, named groups, lookahead assertions, verbose mode for readable patterns, and common pitfalls like greedy matching. Clearest applied walkthrough in a real language, with explicit coverage of readable patterns (re.VERBOSE) and common mistakes.

WebsiteFree

Regular Expression Tutorial (Regular-Expressions.info)

The single best free resource: explains engine internals, not just syntax, and its flavor comparison tables are unmatched. Jan Goyvaerts's free tutorial and reference explaining how regex engines actually process patterns: backtracking, greedy versus lazy quantifiers, atomic groups, lookarounds, Unicode, and a flavor-by-flavor comparison of syntax across Perl, PCRE, Java, .NET, Python and JavaScript.

CourseFree

RegexOne: Learn Regular Expressions with Interactive Exercises

Short browser-based lessons, each followed by an exercise you must pass by writing a pattern. Covers literals, character classes, repetition, anchors, capture groups and alternation, then practice problems such as parsing emails, phone numbers and log lines. A great interactive, exercise-first entry point resource.

See all Regular Expressions resources β†’