Regex Tester

Test and debug regular expressions against your text, with live matches and capture groups.


  

ToolsSoup's Regex Tester is a free online tool for building and debugging regular expressions right in your browser. Type a pattern and flags, paste your test string, and instantly see every match along with its position and capture groups — no uploads, no sign-up, and nothing ever leaves your device.

What is a regex tester?

A regex tester runs a regular expression against sample text and shows you exactly what it matches. Instead of guessing whether your pattern works, you see each match, the index where it starts, and the contents of every capture group. Developers use it to validate input formats, extract data from strings, debug search-and-replace patterns, and learn how regular expressions behave.

How to test a regular expression online

Checking a regex with ToolsSoup takes only a few seconds:

  1. Type your regular expression in the pattern field (no slashes needed).
  2. Add any flags such as g, i, m, s, or u in the flags field.
  3. Paste the text you want to search into the test string box.
  4. Click Test to list every match with its position and capture groups, then copy the results with one click.

Which regex flags are supported?

This tool uses the JavaScript regular expression engine, so it supports the standard flags: g (global, find all matches), i (case-insensitive), m (multiline anchors), s (dotAll, lets the dot match newlines), u (unicode), and y (sticky). The global flag is always applied internally so that every match is listed, not just the first.

Why use this regex tester?

  • 100% free with no ads, sign-up, or usage limits.
  • Runs entirely in your browser — your pattern and text are never uploaded to a server.
  • Lists every match with its index and numbered or named capture groups.
  • Clear error messages when a pattern is invalid.
  • Works offline once the page has loaded.

Frequently asked questions

Is this regex tester free?

Yes. Every tool on ToolsSoup is completely free to use, with no account, sign-up, or hidden limits.

Which regular expression syntax does it use?

It uses the native JavaScript (ECMAScript) regex engine built into your browser, so patterns behave exactly as they would in JavaScript, including named capture groups and lookbehind in modern browsers.

Do I need to wrap my pattern in slashes?

No. Enter only the pattern itself in the pattern field and put any flags in the separate flags field. There is no need for the leading and trailing slashes you might write in code.

Why isn't my regex matching anything?

Common causes are forgetting the case-insensitive i flag, unescaped special characters such as . or (, or anchors like ^ and $ that don't line up with multiline text. Try removing parts of the pattern until it matches, then add the rest back.

Is my data safe?

Absolutely. All matching happens locally in your browser using JavaScript, so your pattern and test string are never sent to or stored on any server.