Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
awesome-regex
A curated collection of awesome regex tools, tutorials, libraries, etc.
https://github.com/slevithan/awesome-regex
Last synced: 5 days ago
JSON representation
-
Grep-like tools
-
Command line
- ripgrep - Better and faster grep. Recursively searches directories while respecting gitignore rules and skipping hidden/binary files.
- Feature comparison of grep-like tools
-
GUI
- PowerRename - regex/raw/main/media/windows.svg" title="Windows" height="13"></picture>) - Rename files using regexes.
- Aba Search and Replace - regex/raw/main/media/windows.svg" title="Windows" height="13"></picture>, $30) - Displays matches as you type.
- PowerGREP - regex/raw/main/media/windows.svg" title="Windows" height="13"></picture>, $159) - Can search through archives, binary files, PDFs, docs/sheets, emails, etc., via its GUI or the command line.
- RegexRenamer - regex/raw/main/media/windows.svg" title="Windows" height="13"></picture>) - Rename files using regexes.
-
-
Regex engines
-
Source code
- Boost.Regex - Popular C++ regex library.
- Hyperscan - Intel's high-performance library, used for [DPI](https://en.wikipedia.org/wiki/Deep_packet_inspection).
- Onigmo - Forked and extended from Oniguruma. Default regex library of Ruby 2.0+.
- Oniguruma - Popular C regex library. Default regex library of Ruby 1.9.
- PCRE2 - Popular C regex library used by PHP, R, etc.
- RE2 - Popular C++ regex library used by Go, etc. Non-backtracking engine.
- Rust: regex - Non-backtracking engine.
- Perl - See [perlreguts](https://perldoc.perl.org/perlreguts).
- Python: re - regex) - Standard and extended regex libraries.
- ICU - Unicode org's package with full Unicode support.
- Java: java.util.regex - JDK standard regexes.
- .NET: System.Text.RegularExpressions - Shared by all .NET languages (C#, VB, etc.).
- JavaScriptCore: RegExp - Regex engine used by Safari.
- ICU - Unicode org's package with full Unicode support.
- V8: Irregexp - Regex engine used by Chrome, Edge, [Firefox](https://hacks.mozilla.org/2020/06/a-new-regexp-engine-in-spidermonkey/), etc.
-
Flavor differences
-
Documentation
- Pattern
- Syntax
- re
- Syntax
- regex - lite/latest/regex_lite/).
- Grammars - best-practices)).
- Regular Expressions - Flavor: ICU.
- Regular Expressions - Flavor: PCRE.
- Regexp - Flavor: Onigmo.
- NSRegularExpression - Flavor: ICU.
- RegExp - US/docs/Web/JavaScript/Reference/Regular_expressions), [Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions), [Cheatsheet](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Cheatsheet).
- Manual
- Regular expressions library
- Introduction
- Regular Expressions
- Pattern - summary.html).
- Overview - us/dotnet/standard/base-types/regular-expression-language-quick-reference), [API](https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions).
- RE
- regexp - Flavor: RE2.
-
-
Performance
-
Benchmarking
- rebar - benchmark](https://github.com/mariomka/regex-benchmark).
-
ReDoS checkers
- recheck - labs.github.io/recheck/)] - JavaScript and Scala library for detecting ReDoS vulnerability. Can be used as an ESLint plugin.
- vuln-regex-detector - Perl library for detecting ReDoS vulnerability.
- regex.rip - Test a regex for ReDoS vulnerability.
-
Flavor differences
- ReDoS
- Boost.Regex: Performance - Compares Boost, C++ `std::regex`, and others.
-
Crafting efficient regexes
- Runaway Regular Expressions: Catastrophic Backtracking - Exploration and solutions for superlinear backtracking.
- Book: High Performance JavaScript - *Chapter 5: Strings and Regular Expressions*.
- Book: Mastering Regular Expressions, 3rd Edition - *Chapter 6: Crafting an Efficient Expression*.
- Performance of Greedy vs. Lazy Regex Quantifiers - Illustrates the mechanics of backtracking.
-
Regex engine optimizations
- Regular Expression Matching Can Be Simple And Fast - On non-backtracking engines. A [follow up](https://swtch.com/~rsc/regexp/regexp3.html) includes comparisons of RE2 and PCRE performance.
- Regular Expression Improvements in .NET 7 - performance-improvements-in-net-5/) - Includes detailed explanations of performance optimizations.
- ripgrep is faster than {grep, …} - Includes details about what makes ripgrep and Rust's `regex` fast.
-
-
JavaScript regex libraries
-
Alternative regex builders and engines
- regex - Context-aware regex template tag with advanced features and best practices built-in.
- XRegExp - Extended regex syntax, flags, and utils; useful for backcompat.
- incr-regex-package - Partial/incremental matching, used by [react-rxinput](https://github.com/nurulc/react-rxinput) for input validation with a regex mask.
- node-re2 - Bindings for RE2, a non-backtracking engine.
- rregex - Bindings for Rust's `regex`, a non-backtracking engine.
-
Abstracted regex syntax
- Rexx - A template tag that uses structured syntax with variables and comments.
- Melody - lavi.github.io/melody/book/)] - A language that compiles to regexes.
- compose-regexp.js - regexp](https://github.com/unjs/magic-regexp) \[[*home*](https://regexp.dev/)], [Super Expressive](https://github.com/francisrstokes/super-expressive) \[[*playground*](https://nartc.github.io/ng-super-expressive/)].
-
Regex processors
- regexp-tree - community/regexpp) (used by ESLint), [regjsparser](https://github.com/jviereck/regjsparser)/[regjsgen](https://github.com/bnjmnt4n/regjsgen).
- regexp-ast-analysis - ast-analysis/docs/latest/)] - Analyze AST nodes produced by regexpp.
- Regex Colorizer - colorizer/demo/)], [CodeMirror PCRE mode](https://github.com/xavierog/codemirror-mode-pcre).
- eslint-plugin-regexp - meshi.github.io/eslint-plugin-regexp/)], [eslint-plugin-optimize-regex](https://github.com/BrainMaestro/eslint-plugin-optimize-regex).
- randexp.js - to-strings](https://github.com/wimpyprogrammer/regex-to-strings).
- regexgen
- AST Explorer: RegExp - View ASTs generated by regexp-tree, regexpp, and regjsparser.
-
-
JavaScript regex evolution
-
Regex processors
- flag `s` - regexp-lookbehind), [named capture](https://github.com/tc39/proposal-regexp-named-groups), and (behind flag `u`) [Unicode properties](https://github.com/tc39/proposal-regexp-unicode-property-escapes) via `\p{…}` and `\P{…}` (see [list](https://github.com/mathiasbynens/regexpu-core/blob/main/property-escapes.md)).
- `matchAll`
- `replaceAll`
- flag `d`
- flag `v` - v-flag)] as an upgrade to flag `u` (can't be used together), which adds a set of multicharacter "properties of strings" to `\p{…}`, multicharacter elements within character classes via `\p{…}` and `\q{…|…}`, nested character classes, set operators `[…--…]` and `[…&&…]`, and different escaping rules within character classes. It also fixes case-insensitive matching for `\p` and `\P` within negated `[^…]`.
- regexpu - unicode-properties)).
- Duplicate named capturing groups - Ex: `(?<a>…)|(?<a>…)`.
- Extended mode and comments - Flag `x` (`extended`) with insignificant whitespace and line comments (`#…`), plus inline comments via `(?#…)`.
- Pattern modifiers - Ex: `(?ims:…)`, `(?-ims:…)`, `(?i-ms:…)`.
- Atomic operators - Atomic groups via `(?>…)` and possessive quantifiers (ex: `*+`, `++`).
- Buffer boundaries - Anchors `\A` and `\z`, not affected by flag `m`.
- \R escape - Outside character classes, `\R` matches any line terminator.
- Restrict subclassing support in built-ins - Scaled back `RegExp` subclassing.
- RegExp escaping - `RegExp.escape`.
- Legacy RegExp features - Standardization of legacy features.
- Can I use - Up-to-date browser support tables for individual features.
- standard
- [*explainer*
- [*explainer*
- [*explainer* - folding for flag `i`, and code-point-based matching (with impact on quantifiers, character classes, character class ranges, and built-in sets like `.` and `\W`).
- lists
- [*explainer* - tos/run-chromium-with-flags/)].
-
-
Testers
- GNU sed REPL
- Pythex
- Rubular
- CyrilEx - Java, JavaScript, MySQL, PHP, Python, Ruby.
- Patterns - regex/raw/main/media/macos.svg" title="macOS" height="13"></picture>, $3) - Bash, Emacs, grep, Java, Oniguruma, PCRE, POSIX BRE, POSIX ERE, Ruby, sed.
- RegexPlanet - Go, Haskell, Java, JavaScript, .NET, Perl, PHP, PostgreSQL, Python, Ruby, Tcl, XRegExp.
- regex101 - **Best free and best web-based tester**.
- RegexBuddy - regex/raw/main/media/windows.svg" title="Windows" height="13"></picture>, $40) - **Best tester**.
- RegExr - **Best open source tester**.
- fork
- RegexLearn - **Best multilingual tester** (JavaScript).
- regexplained - **Best tester for presentations** (JavaScript).
- RegViz
- Regex Storm - storm)].
- PHP Live Regex
-
Collections of patterns
-
ReDoS checkers
- Book: Regular Expressions Cookbook, 2nd Edition - High-quality solutions with detailed explanations.
- Regex DB - Solutions include basic descriptions and examples of matching and non-matching text.
-
-
Syntax-free regex builders
- ChatGPT - Ex: *"create a regex that matches `X` and explain it step by step"*.
- RegexMagic - regex/raw/main/media/windows.svg" title="Windows" height="13"></picture>, $40) - Generate regexes using samples and rules.
- Regex Generator - generator)] - Generate simple regexes from a sample text.
- Regex.ai - Mark samples in a text and use AI to generate potential regexes.
-
Visualizers
- Regex Vis - vis)] - Create railroad diagrams, with visual editor. Flavor: JavaScript.
- Regulex - Create railroad diagrams. Flavor: JavaScript.
- Nodexr - Graphical editor with visual hierarchy. Flavor: .NET.
- Regex Nodes - nodes)] - Graphical editor with visual hierarchy. Flavor: JavaScript.
- Debuggex - Create railroad diagrams. Flavors: JavaScript, PCRE, Python.
- RegExper - static)] - Create railroad diagrams. Flavor: JavaScript.
-
Miscelaneous
-
Regex processors
- regex101 Regex Quiz - Requires sign-in.
- Regex - Regex search on webpages via `Ctrl+Shift+F`.
- Regex Crossword
- xkcd
-
-
Tutorials
-
Videos
- *Demystifying Regular Expressions* - Great presentation for beginners, by Lea Verou at HolyJS 2017 (1hr 12m).
- *Learn Regular Expressions In 20 Minutes* - Live syntax walkthrough in a regex tester, by Kyle Cook.
- Udemy
-
Traditional
- Regular-Expressions.info - Covers numerous regex flavors.
- The Modern JavaScript Tutorial: Regular expressions - tutorial/en.javascript.info)] - Guide to using regexes in modern JavaScript.
- others
- RexEgg - Detailed tutorial with advanced topics.
- learnbyexample - Ebooks on regexes ([JavaScript](https://learnbyexample.github.io/learn_js_regexp/), [Python](https://learnbyexample.github.io/py_regular_expressions/), [Ruby](https://learnbyexample.github.io/Ruby_Regexp/)) and command line text processing.
- Regular Expressions for Regular Folk - for-regular-folk)] - Visual, example-based ebook for beginners.
-
With interactive exercises
- RegexLearn - Interactive tutorial and practice problems.
- RegexOne - Interactive tutorial and practice problems.
-
-
Books
-
Regex processors
- *Regular Expressions Cookbook, 2nd Edition* - Regex tutorial with code samples for eight programming languages, 100+ regex recipes for practical problems, and a deep focus on cross-flavor differences.
- *Mastering Regular Expressions, 3rd Edition* - A computer science classic, best for people who already know the basics. Includes good coverage of crafting efficient regexes.
- *Introducing Regular Expressions* - An intro for programmers new to regular expressions that sticks to the basics.
-
-
Articles
-
Regex processors
- *The World's Shortest Regex Compiler?* - dfa) on optimization - Introduction to writing a non-backtracking regex engine (in JavaScript).
- *Regex Legends: The People Behind the Magic* - Influential people behind the technology.
- *Fun With .NET Regex Balancing Groups* - Advanced usage of a .NET-only regex feature.
-
-
Communities
-
Regex processors
-
Programming Languages
Categories
Sub Categories
Regex processors
41
Documentation
19
Source code
15
Flavor differences
6
Traditional
6
ReDoS checkers
5
Alternative regex builders and engines
5
GUI
4
Crafting efficient regexes
4
Abstracted regex syntax
3
Videos
3
Regex engine optimizations
3
Command line
2
With interactive exercises
2
Benchmarking
1
Keywords
regex
13
regexp
10
regular-expression
9
rust
4
regular-expressions
3
eslint-plugin
2
javascript
2
c
2
nfa
1
dfa
1
automaton
1
automata
1
windows
1
powertoys
1
powerrename
1
microsoft-powertoys
1
keyboard-manager
1
fancyzones
1
desktop
1
color-picker
1
search
1
ripgrep
1
recursively-search
1
grep
1
gitignore
1
command-line-tool
1
command-line
1
cli
1
unicode
1
es2015
1
ecmascript
1
code-generation
1
ecmascript-proposal
1
testing
1
node
1
eslintplugin
1
syntax-highlighting
1
melodylang
1
melody
1
language
1
compiler
1
typescript
1
unicode-mode
1
buffers
1
one-of-a-kind
1
vulnerability
1
security
1
scala
1
redos-checker
1
redos
1