Awesome Regex
๐ฆ A curated collection of regex tools, tutorials, libraries, etc.
Regex+is a lightweight JavaScript library for more readable, high-performance, native JavaScript regexes with powerfulโฆ
regex101Best free and best web-based tester.; Flavors: Java, JavaScript, .NET, PCRE, RE2, Rust, and emulates Python.; Includesโฆ
RegexBuddy(Windows, $40) - Best tester.; Flavors: Emulates hundreds of flavors/versions, with deep knowledge of differences.;โฆ
RegexPilot(macOS, $21) - Best Mac-native tester.; Flavors: JavaScript, Python (re, regex), Java, .NET, PCRE, Onigmo, RE2, Perl,โฆ
RegExr[GitHub] - Best open source tester.; Flavors: JavaScript, PCRE.; Languages: ๐บ๐ธ, ๐จ๐ณ (fork).
RegexLearn[GitHub] - Best multilingual tester (JavaScript).; Languages: ๐บ๐ธ, ๐น๐ท, ๐ท๐บ, ๐ช๐ธ, ๐จ๐ณ, ๐ฉ๐ช, ๐บ๐ฆ, ๐ซ๐ท, ๐ต๐ฑ,โฆ
regexplained[GitHub] - Best tester for presentations (JavaScript).
pcre2testIncludes regex debugger. Flavor: PCRE.
rxrxIncludes regex debugger (video intro). Flavor: Perl.
CyrilEx[GitHub] - Java, JavaScript, MySQL, PHP, Python, Ruby.
Patterns(macOS, $3) - Bash, Emacs, grep, Java, Oniguruma, PCRE, POSIX BRE, POSIX ERE, Ruby, sed.
RegexPlanet[GitHub] - Go, Java, JavaScript (Bun, Deno, Node.js), .NET, Perl, PHP, PostgreSQL, Python, Ruby, Rust, Swift, Tcl,โฆ
ChatGPTand other LLMs - Ex: "create a regex that matches X and explain it step by step".
RegexMagic(Windows, $40) - Generate regexes using samples and rules.; Flavors: Emulates hundreds of flavors/versions.
Regex Generator[GitHub] - Generate simple regexes from a sample text.
Regex.aiMark samples in a text and use AI to generate potential regexes.
Regex Vis[GitHub] - Create railroad diagrams, with visual editor. Flavor: JavaScript.; Languages: ๐บ๐ธ, ๐จ๐ณ.
Regulex[GitHub] - Create railroad diagrams. Flavor: JavaScript.
Nodexr[GitHub] - Graphical editor with visual hierarchy. Flavor: .NET.
Regex Nodes[GitHub] - Graphical editor with visual hierarchy. Flavor: JavaScript.
DebuggexCreate railroad diagrams. Flavors: JavaScript, PCRE, Python.
Regexper[GitLab] - Create railroad diagrams. Flavor: JavaScript.
ripgrepBetter and faster grep. Recursively searches directories while respecting gitignore rules and skipping hidden/binaryโฆ
nominoRename files uses regexes.; Flavor: Rust.
Aba Search and Replace(Windows, $30) - Displays matches as you type.
PowerGREP(Windows, $159) - Can search through archives, binary files, PDFs, docs/sheets, emails, etc., via its GUI or theโฆ
PowerRename(Windows) - Rename files using regexes.
Regular-Expressions.infoCovers numerous regex flavors.
The Modern JavaScript Tutorial: Regular expressions[GitHub] - Guide to using regexes in JavaScript.; Languages: ๐บ๐ธ, ๐ช๐ธ, ๐ซ๐ท, ๐ฎ๐น, ๐ฏ๐ต, ๐ท๐บ, ๐บ๐ฆ, ๐จ๐ณ (partialโฆ
RexEggDetailed tutorial with advanced topics.
learnbyexample[GitHub] - Ebooks on regexes (JavaScript, Python, Ruby) and command line text processing.
Regular Expressions for Regular Folk[GitHub] - Visual, example-based ebook for beginners.
RegexLearn[GitHub] - Interactive tutorial and practice problems.; Languages: ๐บ๐ธ, ๐น๐ท, ๐ท๐บ, ๐ช๐ธ, ๐จ๐ณ, ๐ฉ๐ช, ๐บ๐ฆ, ๐ซ๐ท,โฆ
RegexOneInteractive tutorial and practice problems.
Demystifying Regular ExpressionsGreat presentation for beginners, by Lea Verou at HolyJS 2017 (1hr 12m).
Learn Regular Expressions In 20 MinutesLive syntax walkthrough in a regex tester, by Kyle Cook.
Boost.RegexC++ regex library.
HyperscanIntel's high-performance library, used for DPI.
ICUUnicode org's package with full Unicode support.
Java: java.util.regexJDK standard regexes.
JavaScriptCore: RegExpRegex engine used by Safari.
V8: IrregexpRegex engine used by Chrome, Edge, Firefox, etc.
.NET: System.Text.RegularExpressionsShared by all .NET languages (C#, VB, etc.).
OnigmoForked from Oniguruma. Used by Ruby 2.0+.
OnigurumaC regex library used by Ruby 1.9, TextMate grammars, etc.
PCRE2Popular C regex library used by PHP, R, etc.
PerlSee perlreguts.
Python: reand regex - Standard and extended regex libraries.
RE2Popular C++ regex library used by Go, etc. Non-backtracking engine.
Rust: regexNon-backtracking engine.
Runaway Regular Expressions: Catastrophic BacktrackingExploration and solutions for superlinear backtracking.
Book: High Performance JavaScript(2010) - Chapter 5: Strings and Regular Expressions.
Book: Mastering Regular Expressions, 3rd Edition(2006) - Chapter 6: Crafting an Efficient Expression.
Performance of Greedy vs. Lazy Regex QuantifiersIllustrates the mechanics of backtracking.
Performance of Regular ExpressionsOn backtracking performance, with detailed examples.
Regular Expression Matching Can Be Simple And FastOn non-backtracking engines. A follow up includes comparisons of RE2 and PCRE performance.
Regular Expression Improvements in .NET 7and .NET 5 - Includes detailed explanations of performance optimizations.
ripgrep is faster than {grep, โฆ}Includes details about what makes ripgrep and Rust's regex fast.
Boost.Regex: PerformanceCompares Boost, C++ std::regex, and others.
regex.ripTest a regex for ReDoS vulnerability.
recheck[home] - JavaScript and Scala library for detecting ReDoS vulnerability. Can be used as an ESLint plugin.
vuln-regex-detectorPerl library for detecting ReDoS vulnerability.
Book: Regular Expressions Cookbook, 2nd Edition(2012) - High-quality solutions with detailed explanations.; Flavors: Java, JavaScript, .NET, PCRE, Perl, Python,โฆ
Regex DBSolutions include basic descriptions and examples of matching and non-matching text.
Regex+is a lightweight JavaScript library for more readable, high-performance, native JavaScript regexes with powerfulโฆ
Oniguruma-To-ESConvert Oniguruma patterns to native JavaScript regexes.
RexxA template tag that uses structured syntax with variables and comments.
Melody[docs] - A language that compiles to regexes.
regexp-ast-analysis[docs] - Analyze AST nodes produced by regexpp.
eslint-plugin-regexp[home] - ESLint plugin for finding regex mistakes, etc.
arkregexRegExp-equivalent constructor with TS types.
super-regexAdd an execution timeout to regexes.
regex-utilsCheck regex equivalence, build regex intersections, and other utilities.
regexgenGenerate a regex that matches a set of strings.
Regex Colorizer[home] - Highlight regex syntax.
regex-to-mermaidGenerate Mermaid diagrams to visualize regexes.
Regexes Got Good: The History And Future Of Regular Expressions In JavaScriptCan I useUp-to-date browser support tables for individual features.
Extended mode and comments(2021) - Flag x (extended) with insignificant whitespace and line comments (#โฆ), plus inline comments via (?#โฆ).
Atomic operators(2021) - Atomic groups via (?>โฆ) and possessive quantifiers (ex: *+, ++).
Buffer boundaries(2021) - Anchors \A and \z, not affected by flag m.
\R escape(2021) - Outside character classes, \R matches any line terminator.
Restrict subclassing support in built-ins(2020) - Scaled back RegExp subclassing.
Legacy RegExp features(2015) - Standardization of legacy features.
Regular Expressions Cookbook, 2nd Edition(2012) by Jan Goyvaerts and Steven Levithan - Regex tutorial with code samples for eight programming languages, 100+โฆ
Mastering Regular Expressions, 3rd Edition(2006) by Jeffrey Friedl - A computer science classic, best for people who already know the basics. Includes goodโฆ
Introducing Regular Expressions(2012) by Michael Fitzgerald - An intro for programmers new to regular expressions that sticks to the basics.
The World's Shortest Regex Compiler?and a follow up on optimization - Introduction to writing a non-backtracking regex engine (in JavaScript).
Regex Legends: The People Behind the MagicInfluential people behind the technology.
Reddit: r/regexQuestions and help on all topics concerning regular expressions.
Stack Overflow: [regex]