Home

Awesome

<!--lint ignore awesome-heading--> <div align="center">

Awesome Regex

Awesome ย <sup>Shortcut URL: regex.cool</sup>

</div>

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).

<details> <summary>๐Ÿ“– <b>Glossary</b></summary> <br>

A brief glossary of regular expression terms as used in this list.

</details>

Featured resource

<a href="https://github.com/slevithan/regex"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/slevithan/regex@4.1.0/media/regex-logo-dark.svg"> <img alt="regex logo" height="100" align="right" src="https://cdn.jsdelivr.net/gh/slevithan/regex@4.1.0/media/regex-logo.svg"> </picture> </a>

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, subroutine definition groups, and context-aware interpolation.

Contents

Testers

For building, testing, and playing with regexes.

<details> <summary>โœณ๏ธ <b>Notable mentions</b></summary> <br>

Flavors

Multiple flavors

</details>

Syntax-free regex builders

Build regexes without writing regex syntax or code.

<details> <summary>โœณ๏ธ <b>Notable mentions</b></summary> <br> </details>

Visualizers

Visualize how your regular expressions are structured or operate.

<details> <summary>โœณ๏ธ <b>Notable mentions</b></summary> <br> </details>

Grep-like tools

Search and replace through files.

Command line

โž• See also: Feature comparison of grep-like tools.

GUI

Tutorials

Learn how to use regular expressions.

Traditional

<details> <summary>โœณ๏ธ <b>Notable mentions</b></summary> <br> </details>

With interactive exercises

Videos

Regex engines

Major regex implementations, built into programming languages or as standalone libraries.

Documentation

Official regex references and guides.

Regex flavors

โ„น๏ธ Raku (formerly Perl 6) reimagines regexes. See: Grammars (tutorial), Regexes (best practices).

Without own flavor

Source code

Read or contribute to the code behind major regex implementations.

Flavor differences

Syntax and behavior differences between regex flavors.

Performance

Pattern and engine performance, benchmarks, and ReDoS prevention.

Crafting efficient regexes

โ„น๏ธ With backtracking engines, how you craft a regex can affect how fast it finds matches or reports failures.

<details> <summary>โœณ๏ธ <b>Notable mentions</b></summary> <br> </details>

Regex engine optimization

Benchmarking

ReDoS checkers

โš ๏ธ These tools have limitations on supported syntax.

Collections of patterns

Prewritten regexes for specific tasks.

<details> <summary>โš ๏ธ <b>Word of warning</b></summary> <br>

Many regexes found online are low quality. It's risky to use regexes you don't fully understand in code, since they might have false positives/negatives, be vulnerable to performance problems with certain target strings, or assume a different regex flavor.

</details>

JavaScript regex libraries

Open source JavaScript libraries for advanced regex use and processing.

Alternative regex builders and engines

Abstracted regex syntax

Regex processors

JavaScript regex evolution

The history of improvements to regular expressions in the JavaScript standard. Starting with ES2018, includes links to the TC39 proposals where features were developed and discussed.

Each edition from ES2019 to ES2023 added additional Unicode properties that can be used via \p{โ€ฆ} and \P{โ€ฆ} (see lists). ES2021 added string method replaceAll, although, when given a regex, the only difference from ES3's replace is that it throws if not using flag g.

<details> <summary>โž• <b>See also</b></summary> <br> </details> <details> <summary>๐Ÿ”ฎ <b>Future: Active proposals</b></summary> <br> </details>

Books

A curated list of regex books.

Articles

A curated list of regex articles.

Communities

Discuss, assist, and get help with regular expressions.

Miscellaneous

Other interesting, fun, and useful stuff.