MinifyPic

Regex Tester

Write a regular expression and watch it match against your test text in real time, with every capture group broken out.

FreeLive matchingCapture groups
Loading tool…

How it works

A compact workflow from input to download.

1

Write your pattern

Enter the regular expression and set the flags you need — global, case-insensitive, multiline.

2

Add test text

Paste in sample text and every match is highlighted immediately as you type.

3

Inspect the matches

Each match and its capture groups are listed, so you can see exactly what the pattern is picking up.

Frequently asked questions

Which regex dialect is this?
JavaScript's, since it runs in your browser using the native engine. It is close to what you will find in most languages, but there are real differences — lookbehind support varies, and named groups, Unicode property escapes and some syntax differ between JavaScript, PCRE, Python and Go. Test in the dialect you will actually deploy in.
What do the flags do?
The global flag finds every match rather than stopping at the first. The case-insensitive flag ignores capitalisation. The multiline flag makes the start and end anchors match at each line break rather than only at the start and end of the whole string — which is usually what you want when processing text line by line.
Why is my regex catastrophically slow?
You have probably hit catastrophic backtracking. Nested quantifiers — a repeated group that itself contains a repetition, such as (a+)+ — can force the engine to try an exponential number of ways to match a failing string, and a pattern that runs instantly on short input can hang the process entirely on a slightly longer one. It is a genuine denial-of-service vector when the pattern is applied to user input.
Is my data sent to a server?
No. Everything runs in JavaScript inside your own browser tab — nothing is uploaded, logged or stored. That is what makes it safe to paste in API responses, config files, tokens and other material you could not send to a third-party service.

A tiny language for describing shapes of text

A regular expression is a small, dense language whose only purpose is to describe patterns in text. Once the vocabulary clicks, an enormous amount of everyday work collapses into a single line: pulling every URL out of a document, validating that a field looks like a date, splitting a log line into its component fields, or finding every function definition in a file. The density is both its power and its reputation — a regex that would take thirty lines of hand-written parsing is one line of symbols, and that line is genuinely hard to read six months later. The two habits that make regexes maintainable are to comment them, and to test them against real data rather than the three examples you happened to think of.

Know when not to use one

Regular expressions are the wrong tool for parsing nested structures, and this is not a matter of taste. HTML, XML and JSON can nest arbitrarily deeply, and regular expressions — in their formal sense — provably cannot count nesting depth, which is why the famous Stack Overflow answer about parsing HTML with regex descends into cosmic horror. The pattern that works for your ten test cases will fail the moment a real document nests one level deeper or puts an angle bracket inside an attribute. Use a real parser for structured formats. Keep regexes for what they are genuinely superb at: flat, line-oriented, pattern-shaped text — log files, CSV fields, validation, search and replace.