Regex Tester

Write and test regular expressions with live match highlighting, capture groups and replace.

Loading the tool…

How to use the Regex Tester

  1. Type your pattern and choose the flags.
  2. Paste the text you want to test against.
  3. Review the highlighted matches and capture groups.
  4. Copy the finished pattern, or build one in the Visual Pattern Builder and load it into the tester.

About this tool

Test regular expressions against your own text and see every match highlighted as you type. Toggle the g, i, m, s and u flags, inspect capture groups in a matches table, and build patterns step by step with the Visual Pattern Builder, or start from the preset library and cheat sheet.

Patterns run on your browser's JavaScript regex engine, so the results match what your JavaScript code will do. Your pattern and test text stay in the browser; there's no account and nothing is uploaded.

Why OmneKit

  • Private: patterns and test text stay in your browser.
  • Free, with no sign-up.
  • A visual builder and presets for patterns you don't write every day.

Frequently asked questions

How does the live regex matching work?

As you type your regular expression pattern and test string, the tool compiles the regex using JavaScript's built-in RegExp constructor and runs it against the test text. All matches are highlighted, the number of matches is shown next to the pattern, and capture groups (including named groups) are listed in a matches table.

What regex flags are supported?

The tester supports the g, i, m, s and u JavaScript regex flags: g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), s (dotAll — . matches newlines), and u (unicode — enables full Unicode matching including surrogate pairs).

Why does my regex show an error?

The most common causes are unescaped special characters (like parentheses, brackets, or backslashes), unmatched grouping constructs, or invalid quantifier syntax. The error message displayed below the pattern input will indicate exactly what the JavaScript engine could not parse.

How does the Visual pattern builder work?

The Visual pattern builder lets you construct expressions visually by adding rule blocks (literal text, digit sets, whitespace, or custom character sets) and configuring their repetitions (optional, one or more, specific ranges). It automatically escapes special characters and compiles them into a valid regex pattern that you can load into the tester with "Use in tester".

What happens if my regex is very slow?

Matching runs in a background worker, so the page never freezes. Some patterns, such as (a+)+$, take exponentially longer as the text grows ("catastrophic backtracking"). If a pattern runs for more than 2 seconds, the tester stops it and tells you, so you can make the nested quantifiers less ambiguous before using the pattern in your own code.

Is my text private?

Yes. Your pattern and test text are processed by your browser's own JavaScript regex engine on your device. Nothing you type is sent to a server.

  • Files stay on your device
  • Free, no sign-up
  • No upload wait
  • Works on phone & desktop