Regex — Live JavaScript Regex Tester by @nap.codes.

By@nap.codes
READYv1.0 · JS flavor
01PATTERNEmpty
/ /
02TEST STRING0 matches
03REPLACE

Free regex tester — JavaScript flavor, live highlighting

Type a pattern, see matches highlighted as you type. Inspect capture groups, run replace with backrefs, use common patterns from presets.

Uses your browser's native RegExp — same behavior as Node.js and any client-side JS. Zero data uploaded.

Frequently asked

Which flavor?

JavaScript regex (ECMAScript). Slight differences vs PCRE (used in PHP/Ruby) or Python's re — mostly around lookbehinds and named groups, which JS supports as of ES2018.

How is my pattern tested?

Native new RegExp(pattern, flags). No server round-trips.

What do the flags mean?

g global, i ignore case, m multiline (^ and $ match line ends), s dotall (. matches newlines), u unicode, y sticky.

Backreferences in replace?

$1, $2, etc. refer to capture groups. Named groups use $<name>.

Commercial use?

Yes, free for any use.