TurantToolsdev</> All tools

// free ยท runs in your browser ยท nothing uploaded

Regex Tester

Test JavaScript regular expressions live: every match highlighted, numbered and named groups, all flags, and replace with $1 or $<name>. Slow patterns are stopped so your browser never freezes.

1. Pattern

//g
Examples:

2. Test text

3. Matches

Uses your browser's JavaScript regex engine (the same as Node.js and Chrome). Your test text never leaves your device and is not put in share links; only the pattern and flags are.

๐Ÿ’ฌ Share this regex

๐Ÿ“š Official sources: MDN regular expressions

We build every tool from the official rules and re-check them when they change. Always confirm with the official source before you rely on a result.

๐Ÿ› ๏ธ Spotted a mistake or an out-of-date rule? Tell us

How it works

Your pattern and flags are compiled with JavaScript's own RegExp in a background worker. The tool lists every match with its position and capture groups, highlights them in the text, and if you give a replacement, shows the result. If the pattern runs too long, the worker is stopped so the page doesn't freeze.

Example: turning ISO dates into day/month/year

Pattern (\d{4})-(\d{2})-(\d{2}) with the g flag on "Due 2026-10-28, paid 2026-11-03" finds 2 matches; replacing with $3/$2/$1 gives Due 28/10/2026, paid 03/11/2026.

Good to know

Guides

Related tools

Questions people ask

Which regex flavour does this use?+

JavaScript (ECMAScript), the same engine as Chrome and Node.js. It supports named groups (?<name>โ€ฆ), lookbehind, Unicode property escapes with the u flag, and the s (dotAll) flag.

What do the flags mean?+

g finds every match instead of the first, i ignores upper/lower case, m makes ^ and $ match at each line, s lets . match line breaks, and u turns on full Unicode support.

Why was my pattern stopped?+

Some patterns, such as nested quantifiers like (a+)+, can take exponential time on certain text (catastrophic backtracking). The tester runs each pattern in a separate worker and stops it after 1.5 seconds so your page never freezes.

How do I use groups in the replacement?+

Use $1, $2 โ€ฆ for numbered groups, $<name> for named groups and $& for the whole match.

Regex

More free tools