[](https://github.com/slevithan/awesome-regex)
[](https://awesome.re) Shortcut URL: [`regex.cool`](https://regex.cool/)
Awesome Regex curates the best regular expression tools, tutorials, libraries, and other resources, covering all major regex flavors.
Regular expressions (regex or regexp) are a powerful and concise way to search, parse, and process text. They're built into many programming languages, text editors, IDEs, database engines, word processors, and other tools.
Contributions are welcome. Add links through pull requests (guidelines).
π Glossary
*A brief glossary of regular expression terms as used in this list.* - **Regex engine:** Software that interprets and executes regular expressions, either built into a programming language or as a standalone library. - **Regex flavor:** A unique set of regex syntax and behavior. Basic syntax is typically shared across flavors, but more advanced features often vary, sometimes in subtle or incompatible ways. A flavor might be shared across multiple implementations or programming languages. - Ex: The βJavaScriptβ flavor is defined by the ECMAScript spec; implemented by multiple engines (V8, etc.). - Ex: The βPCREβ flavor is the PCRE2 library, used by numerous programming languages and tools. - Ex: Ruby swapped its regex implementation twice from version 1.8 β 1.9 β 2.0, so each used a distinct flavor. The Ruby 2.0+ flavor is referred to here as either βRubyβ or βOnigmoβ (the underlying regex library). - **Non-backtracking engine:** A regex implementation that uses a non-backtracking algorithm and runs in linear time. This rules out worst case performance from superlinear backtracking, but it's slower with some patterns and precludes some useful features like backreferences.
Featured resource
Regex+ is a lightweight JavaScript library for more readable, high-performance, native JavaScript regexes with powerful features including free spacing, atomic groups, possessive quantifiers, subroutines, definition groups, and context-aware interpolation.
Contents
- Testers
- Syntax-free regex builders
- Visualizers
- Grep-like tools
- Tutorials
- Regex engines
- Documentation
- Source code
- Flavor differences
- Performance
- Collections of patterns
- JavaScript regex libraries
- JavaScript regex evolution
- Books
- Articles
- Communities
- Miscellaneous
Testers
For building, testing, and playing with regexes.
- regex101 - Best free and best web-based tester.
- Flavors: Java, JavaScript, .NET, PCRE, RE2, Rust, and emulates Python.
- Includes regex debugger (PCRE only).
- RegexBuddy (Windows, $40) - Best tester.
- Flavors: Emulates hundreds of flavors/versions, with deep knowledge of differences.
- Includes regex debugger.
- 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).
β³οΈ Notable mentions
**Command line** - [pcre2test](https://pcre2project.github.io/pcre2/doc/pcre2test/) - Includes regex debugger. Flavor: PCRE. - [rxrx](https://metacpan.org/dist/Regexp-Debugger/view/bin/rxrx) - Includes regex debugger ([video intro](https://www.youtube.com/watch?v=zcSFIUiMgAs)). Flavor: Perl. **By flavor** - fancy-regex (Rust library): [fancy-regex playground](https://fancy-regex.github.io/fancy-regex/) \[[*GitHub*](https://github.com/fancy-regex/fancy-regex/tree/main/playground)]. - JavaScript: [RegViz](http://regviz.org/). - .NET: [Regex Storm](http://regexstorm.net/tester) \[[*GitHub*](https://github.com/lonekorean/regex-storm)].