Regex Tools
Test, extract, replace, and explain JavaScript regular expressions. Flavor differences vs PCRE are called out.
5 tools · 100% browser-based · No uploads · No signup
About these Regex tools
Regex tools test, extract, replace, and explain patterns using the JavaScript regular expression engine. The cheat sheet is a syntax map with examples. If you live in Python, Go, or POSIX, expect small differences (lookbehind, named groups, Unicode).
A regex is a compact program. Catastrophic backtracking can freeze a tab on crafted input. Keep tests on representative samples, not a 50 MB log in one shot.
Tools in this category
Regex Tester
This is JavaScript regex, not PCRE, not Python, not Go. A pattern that “worked in PHP” can fail here for reasons that look like your test string is wrong.
Regex Matcher
Regex match extractor online. Extract all matches and capture groups from text. Export matches as JSON, CSV, or plain list—free regex extraction tool.
Regex Replacer
Find and replace with regular expressions, with live preview and capture-group support ($1, $2).
Regex Explainer
Regex explainer online. Break down regex patterns into tokens with plain English explanations. Understand any regex visually—free regex breakdown tool.
Regex Cheat Sheet
Regex cheat sheet online. Complete regex syntax reference with examples: character classes, quantifiers, anchors, groups, and flags. Free regex guide.
How these tools run in your browser
The tester compiles new RegExp(pattern, flags) and runs it on your text. Explainer tokenizes a common subset of JS regex syntax. It will not fully parse every exotic construct. Replacer uses String.prototype.replace semantics.
Common Use Cases
- Debug a pattern against a sample log line with live highlights
- Extract all capture groups to JSON or CSV
- Preview a replace with $1 backreferences before you run it in an editor
- Read a dense pattern token by token
- Look up anchors, character classes, and flags
Common Mistakes
Frequently Asked Questions
Flavor mismatch. Switch regex101 to ECMAScript or rewrite lookbehind and possessive quantifiers.
grep is POSIX or PCRE depending on flags. Anchors and word boundaries differ. Test in the environment that will run the pattern.
Not automatically. Write the pattern and test it here. Generated regex from a few examples is usually wrong on the next input.