Awesome Lists

awesome-regex

by slevithan

awesome listpushed almost 2 years ago

Curated collection of awesome regex tools, tutorials, libraries, etc.

AI summary

Regex resource

A curated collection of regular expression tools and resources.

stars
260
forks
8
watching
8
entries
139

What's in the list

139 links in 34 sections, with live GitHub stats.activeno commit in 2y

Testers

Testers / RegExr

  • fork

    Languages: ๐Ÿ‡บ๐Ÿ‡ธ, ๐Ÿ‡จ๐Ÿ‡ณ ( )

Testers

Syntax-free regex builders

  • ChatGPT

    (and other LLMs) - Ex:

  • RegexMagic

    ( , $40) - Generate regexes using samples and rules

  • Regex 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

    [ ] - Create railroad diagrams, with visual editor. Flavor: JavaScript

  • Regulex

    [ ] - Create railroad diagrams. Flavor: JavaScript

  • Nodexr

    [ ] - Graphical editor with visual hierarchy. Flavor: .NET

  • Regex Nodes

    [ ] - Graphical editor with visual hierarchy. Flavor: JavaScript

  • Debuggex

    Create railroad diagrams. Flavors: JavaScript, PCRE, Python

  • Regexper

    [ ] - Create railroad diagrams. Flavor: JavaScript

Grep-like tools / Command line

  • ripgrep

    Better and faster grep. Recursively searches directories while respecting gitignore rules and skipping hidden/binary files

Grep-like tools / GUI

  • Aba Search and Replace

    ( , $30) - Displays matches as you type

  • PowerGREP

    ( , $159) - Can search through archives, binary files, PDFs, docs/sheets, emails, etc., via its GUI or the command line

  • PowerRename

    ( ) - Rename files using regexes

Tutorials / Traditional

Tutorials / Traditional / The Modern JavaScript Tutorial: Regular expressions

  • others

    Languages: ๐Ÿ‡บ๐Ÿ‡ธ, ๐Ÿ‡ช๐Ÿ‡ธ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡น, ๐Ÿ‡ฏ๐Ÿ‡ต, ๐Ÿ‡ท๐Ÿ‡บ, ๐Ÿ‡บ๐Ÿ‡ฆ, ๐Ÿ‡จ๐Ÿ‡ณ (partial for )

Tutorials / Traditional

Tutorials / With interactive exercises

  • RegexLearn

    [ ] - Interactive tutorial and practice problems

  • RegexOne

    Interactive tutorial and practice problems

Tutorials / Videos

Documentation

Source code

  • Boost.Regex

    Popular C++ regex library

  • Hyperscan

    Intel's high-performance library, used for

  • ICU

    Unicode org's package with full Unicode support

  • Java: java.util.regex

    JDK standard regexes

Source code / JavaScript:

Source code

  • .NET: System.Text.RegularExpressions

    Shared by all .NET languages (C#, VB, etc.)

  • Onigmo

    Forked from Oniguruma. Used by Ruby 2.0+

  • Oniguruma

    Popular C regex library used by Ruby 1.9, TextMate grammars, etc

  • PCRE2

    Popular C regex library used by PHP, R, etc

  • Perl

    See

  • Python: re

    and - Standard and extended regex libraries

  • RE2

    Popular C++ regex library used by Go, etc. Non-backtracking engine

  • Rust: regex

    Non-backtracking engine

Flavor differences

Performance / Crafting efficient regexes

Performance / Regex engine optimization

Performance / Benchmarking

Performance / ReDoS checkers

  • regex.rip

    Test a regex for ReDoS vulnerability

  • 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

Collections of patterns

JavaScript regex libraries / Alternative regex builders and engines

  • Regex+

    A template tag for extended, readable, high-performance JavaScript regexes

  • Oniguruma-To-ES

    Convert Oniguruma patterns to native JavaScript regexes

  • XRegExp

    [ ] - Extended regex syntax, flags, and utils; useful for backcompat

  • incr-regex-package

    Partial/incremental matching, used by for input validation with a regex mask

  • node-re2

    Use other engines via WASM bindings: (RE2), (Rust's ), (Oniguruma)

JavaScript regex libraries / Abstracted regex syntax

  • Rexx

    A template tag that uses structured syntax with variables and comments

  • Melody

    [ ] - A language that compiles to regexes

  • compose-regexp.js

    Compose with functions: , (implementations for ), [ ], [ ]

JavaScript regex libraries / Regex processors

  • regexpp

    AST builders: (used by ESLint), (includes optimizer, etc.), /

JavaScript regex libraries / Regex processors / regexpp

JavaScript regex libraries / Regex processors

  • Regex Colorizer

    Highlight regex syntax: [ ],

  • eslint-plugin-regexp

    Find regex mistakes and improvements: [ ],

  • randexp.js

    Generate strings that match a given regex: ,

  • regexgen

    Generate a regex from given strings:

JavaScript regex evolution

  • explainer

    ES5 (2009) fixed unintuitive behavior by creating a new object every time regex literals are evaluated [ ], and allowed regex literals to use unescaped forward slashes within character classes ( )

  • explainer

    ES6/ES2015 added: [ ]

JavaScript regex evolution / explainer

  • explainer

    Flag ( ) [ ] [ ], which adds Unicode code point escapes via , strict errors (for unreserved escapes, octal escapes, quantified lookahead, and unescaped special characters in some contexts), Unicode case-folding for flag , and code point matching (with impact on quantifiers, character classes, ranges, and built-in sets)

JavaScript regex evolution

Books

  • Regular Expressions Cookbook, 2nd Edition

    (2012) by Jan Goyvaerts and Steven Levithan - 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

    (2006) by Jeffrey Friedl - A computer science classic, best for people who already know the basics. Includes good coverage of crafting efficient regexes

  • Introducing Regular Expressions

    (2012) by Michael Fitzgerald - An intro for programmers new to regular expressions that sticks to the basics

Articles

Communities

Miscellaneous

Add a GitHub project

Missing a project or an awesome list? Paste its GitHub URL and we fetch it right away.