Avexora Free Tools

Regex Tester

Test regular expressions against sample text and inspect every match and group.

About the Regex Tester

Regular expressions are the power tool of text processing — and famously easy to get subtly wrong. The difference between a pattern that works and one that corrupts data in production is usually one escape or one greedy quantifier, which is why experienced developers never ship a regex they haven't tested against realistic samples. This tester runs your pattern against any text and reports every match: what matched, at which character index, and what each capture group contains.

It uses JavaScript's regex engine, so what works here works in Node.js and every browser (and mostly everywhere else — the core syntax is shared across languages). All the standard flags are supported: i for case-insensitive, m to make ^ and $ match line boundaries, s to let the dot cross newlines, u for proper Unicode handling. Matches are always listed globally so you see every occurrence, and capture groups — the parenthesised sub-patterns you'll use to extract or reorder text — are printed per match, which is where extraction bugs actually hide.

A sound testing habit: paste text that includes both strings that should match and near-misses that shouldn't. A pattern for 6-digit Indian PINs should match 110001 but reject 11000 and 1100011 — testing only the happy case is how catastrophic replacements happen. Invalid patterns return the engine's actual error message rather than a shrug, and everything runs locally, so testing against production log excerpts is safe.

Frequently asked questions

Which regex flavour does this use?
JavaScript's (ECMAScript). Patterns behave exactly as they will in Node.js and browsers. Core syntax carries over to Python, Java and Go, though advanced features like lookbehind vary by engine.
What are capture groups?
Parenthesised parts of a pattern that extract sub-matches — in (\d{2})-(\d{2}), group 1 and group 2 capture the two number pairs separately. The tester prints each group's content for every match.
Why does my pattern match too much?
Usually a greedy quantifier: .* grabs as much as possible. Use the lazy form .*? or a more specific character class like [^,]* to stop at the right boundary.

Get one practical business tip every week

Tools, templates and tactics for running your business — free, no spam.

Related tools

More developer & web utilities