Regex Tester

Test regular expressions live with match highlighting, capture groups and flags — right in your browser.

How to use

  1. Type your regular expression and choose the flags — g for global, i for case-insensitive, m for multiline.
  2. Paste or type the test string below. Matches highlight as you type, and the table shows each match with its index and capture groups.
  3. Adjust the pattern until it catches exactly what you need. Nothing leaves your browser.

About this tool

A regular expression is a pattern that describes a set of strings. It is the tool programmers reach for when they need to find, validate or replace text that follows a rule — an email address, a phone number, a date in a specific format, a repeated word. The pattern language is compact and powerful, which also makes it hard to read: a regex that took five minutes to write can take five hours to debug if you cannot see what it matches.

This tester closes that gap. Type the pattern and the test string, and every match highlights in real time. The table underneath breaks each match into its index and capture groups, which is the information you need when the regex feeds a program. Flags are visible and editable, so switching between global and single-match, or turning case sensitivity on and off, is one keystroke away.

The engine is the one built into your browser — the same JavaScript regex engine your code will use in production. That means the result here is the result you will get there: no translation layer, no dialect mismatch. And because everything runs locally, you can paste production data without it leaving your device.

Frequently asked questions

Which regex engine does this use?

The JavaScript regex engine built into your browser. The result here is the result your code will get.

Does my test string leave my browser?

No. Pattern matching runs entirely in JavaScript on your device. Nothing is uploaded.

What do the flags mean?

g = global (find all matches, not just the first), i = case-insensitive, m = multiline (^ and $ match line boundaries), s = dotAll (. matches newlines), u = unicode.

Why does my regex work here but not in Python?

Different languages use different regex dialects. JavaScript does not support lookbehind in older engines, and Python uses a different syntax for named groups. Test in the language you deploy in.

Is there a match limit?

The tester stops at 500 matches and shows the first 100 in the table, which is enough for any debugging session.

Related tools

Long links? Shorten them for free

Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.

Vai.la is not responsible for how the tools are used or for decisions made based on their results.