Explore Ronda

Regex tester · free · no signup

Regex tester — test a regular expression against real text, live.

Type a pattern and flags, paste some text, and see every match highlighted with its capture groups as you type. JavaScript flavour, with a replace preview.

What it does

About this free Regex tester.

This free regex tester runs JavaScript regular expressions in your browser and highlights every match as you type. Enter a pattern and flags, paste the text you want to search, and see each match with its capture groups and named groups listed underneath. A replace box previews the result of String.replace with $1-style references, so you can check a substitution before it goes into code.

It uses the same engine as your browser, which makes it the right tool for validating patterns destined for Node.js, front-end code, or anything else that speaks ECMAScript regex, including lookbehind, named groups and the s, u, y and d flags.

Free · No signup · Runs in your browser · Last updated

  • Live highlightingEvery match is highlighted in the test text as you edit the pattern.
  • Capture groupsNumbered and named groups listed per match.
  • All JavaScript flagsg, i, m, s, u, y and d are supported.
  • Replace previewSee the output of a replacement with $1, $<name> and $& references.
  • Instant errorsInvalid patterns show the engine’s error message immediately.
  • PrivatePattern and text never leave your browser.
How to use it

How to test a regular expression in four steps.

Type a pattern

Enter the expression without surrounding slashes, for example (\w+)@(\w+)\.com.

Set the flags

Add g to find every match, i to ignore case, m for multiline anchors, and any others you need.

Paste the test text

Matches are highlighted immediately and listed with their capture groups.

Preview a replacement

Optionally enter a replacement string such as $1 at $2 to see what String.replace would produce.

Good to know

Regex tester questions, answered.

Which regex flavour is this?

JavaScript’s, as implemented by your browser — so lookbehind, named groups and the s and u flags work in any modern browser, but PCRE-only features like possessive quantifiers don’t.

What do the flags do?

g finds all matches, i ignores case, m makes ^ and $ match line boundaries, s lets . match newlines, u enables full Unicode, y anchors at lastIndex, d records group indices.

Is my text uploaded?

No — matching happens entirely in your browser.

Does this regex tester support lookbehind and named groups?

Yes. Both are part of modern JavaScript and work in every current browser. Lookbehind is written (?<=...) or (?<!...), and named groups are (?<name>...) with $<name> available in replacements.

Why does my pattern work here but not in Python or Go?

Regex flavours differ. JavaScript does not support possessive quantifiers, atomic groups or inline modifiers like (?i), while other engines lack some JavaScript features. If your target is Python, PCRE, Go or Java, confirm the pattern in that runtime before shipping it.

How do I match across multiple lines?

Use the s flag so that the dot matches newline characters, and the m flag so ^ and $ match at line boundaries rather than only the start and end of the whole text. Without m, ^ matches only once at the very beginning.

From the people behind this

Need a regex to ignore noise on a watched page? Page change monitoring takes ignore patterns.

Page change monitoring watches any URL, yours or theirs, and sends a highlighted diff, an alert and a report on your schedule. $2 a page a month, your whole team included.