Regex Tester

Test regular expressions with live match highlighting, capture groups and a replace preview.

Regex Tester

Test regular expressions against any text, right in your browser. See every match highlighted live, inspect capture groups, and preview replacements. Uses the JavaScript regex engine, so it matches exactly what your code will do.

Enter the pattern without slashes - flags are set below.
Try an example:
Advertise with Racerads: banner, native, push and popunder ads

About Regex Tester

The Regex Tester lets you test regular expressions against any text directly in your browser. It highlights every match live, lists capture groups (numbered and named), supports all JavaScript flags (g, i, m, s, u, y), and includes a replace mode so you can preview substitutions with $1 and $<name> backreferences. Because it uses the browser’s own regex engine, results match exactly what your JavaScript code will do.

How to use Regex Tester

  1. Enter your regular expression pattern (no slashes needed).
  2. Toggle the flags you want, such as g (global) and i (ignore case).
  3. Paste the text to test against and watch matches highlight live.
  4. Switch to Replace mode to preview a substitution using $1, $<name> or $&.

Frequently asked questions

Which regex flavor does it use?

It uses the JavaScript (ECMAScript) regular-expression engine built into your browser, so features like named groups, lookbehind and Unicode property escapes work exactly as they do in your JS code.

What do the flags mean?

g matches all occurrences, i ignores case, m makes ^ and $ match line boundaries, s lets . match newlines (dotall), u enables full Unicode mode, and y (sticky) anchors matching to lastIndex.

How do capture groups and replacements work?

Each match lists its numbered groups ($1, $2…) and any named groups ($<name>). In Replace mode you can reference them in the replacement string - $1 for the first group, $<name> for a named group, and $& for the whole match.

Is my text sent anywhere?

No. The Regex Tester runs entirely in your browser - your pattern and test text never leave your device.

Recommended tools

MBR PROPERTYLISTING LTD
8028, Paphos,❤️ Cyprus
Telegram
Regex Tester - Test Regular Expressions Online | Racerads