Regex tester

JavaScript flavor, live highlighting. Your text stays in the browser.

/ / g

Replace
 

Pattern library

Ready-made patterns with explanations, examples, and honest caveats:

email addressurl (http/https)ipv4 addressuuiddate (yyyy-mm-dd)time (24-hour hh:mm)phone number (international)url slughex colorsemantic versionipv6 address (full form)username

About this tester

Patterns execute with the browser's native RegExp engine — the exact engine your JavaScript will use in production, not an emulation. Matches highlight live as you type, the match list shows capture groups (named and positional), and the replace panel previews String.replace output with $1-style references.

Like every tool on tarhun.dev, it is fully client-side: no account, no server round-trips, no stored history. Paste production logs without a second thought.

Frequently asked questions

Is my test data sent to a server?

No. The pattern runs against your text with your browser’s own JavaScript regex engine, directly on this page. Nothing is transmitted or stored, so pasting logs or real data is safe.

Which regex flavor is this?

JavaScript (ECMAScript) regular expressions — the flavor used in browsers and Node.js. It supports named groups, lookbehind, and Unicode property escapes with the u flag. PCRE-only syntax like atomic groups or possessive quantifiers is not available.

What do the flags mean?

g finds all matches instead of the first; i ignores case; m makes ^ and $ match at line boundaries; s lets . match newlines; u enables full Unicode mode.