← All tools
.*
Text

Regex Tester

Test regular expressions against sample text with live match highlighting and capture group breakdown.

πŸ”’ Runs entirely in your browser β€” no data is ever sent anywhere

When you need to test a regular expression

Regex is powerful and famously easy to get subtly wrong β€” a pattern that correctly matches your first three test cases can silently fail on the fourth. Testing against real sample text before dropping a pattern into a validation function, a log-parsing script, or a find-and-replace across a codebase catches those edge cases immediately, with the specific matches and capture groups highlighted rather than a pass/fail guess. It's also just a faster way to build a pattern incrementally β€” write a small piece, see what it actually matches, extend it β€” instead of writing the whole thing blind.

Why a pattern might not match what you expect

This tool uses JavaScript's native regex engine, the same one every browser and Node.js run, so behavior matches exactly what your actual code will do (with minor flavor differences from PCRE, Python, or .NET regex in edge cases like lookbehind support). The most common reasons a pattern silently doesn't match: forgetting the 'g' flag when you expect more than one match per string, an unescaped special character like '.', '(', or '$' that needs a backslash to be treated literally, or case sensitivity, fixed by adding the 'i' flag. Capture groups β€” the parenthesized parts of a pattern β€” are broken out individually per match here, so you don't have to manually count parentheses to figure out which group captured what.

Frequently asked questions

What regex flavor does this tool use?

JavaScript's native regex engine (ECMAScript), the same one used by Node.js and every browser. Syntax and behavior may differ slightly from PCRE, Python, or .NET regex in edge cases like lookbehind support and Unicode property escapes.

Why isn't my pattern matching anything?

Common culprits: forgetting the 'g' flag when you expect multiple matches, unescaped special characters like '.' or '(' that need a backslash, or case sensitivity β€” add the 'i' flag for case-insensitive matching.

How do I see capture groups?

Capture groups β€” the parts of your pattern wrapped in parentheses β€” are broken out separately for each match, so you can see exactly what each group captured without manually counting parentheses.

Bracketly is free and open-source. If this tool saved you time, consider supporting it.

β˜• Buy me a coffee