Regex Tester

中

Loading...

Regex Tester — Live Pattern Matching with Capture Groups

Test regular expressions against your sample text and see matches highlighted in real time. Capture groups are listed separately so you can verify what each group extracts, and a library of common preset patterns — emails, URLs, dates, IP addresses, and more — gets you started without memorizing syntax.

Whether you are debugging a validation rule, writing a search-and-replace, or learning regex, instant visual feedback beats guess-and-check loops in your code. Everything runs locally, so pasting real log lines or user data is completely private.

How to test a regex

  1. Enter your pattern in the regex field and choose flags (g, i, m) as needed.
  2. Paste or type your test text below.
  3. Watch matches highlight instantly as you edit the pattern.
  4. Inspect the capture groups table to see exactly what each group matched.
  5. Start from a preset pattern from the library and adapt it.

Frequently asked questions

Which regex flavor does this tester use?

JavaScript (ECMAScript) regular expressions — the same engine your web pages and Node.js code use. Most everyday patterns (classes, quantifiers, groups, lookaheads) are identical across languages.

What do the g, i, and m flags do?

g finds all matches instead of stopping at the first; i makes matching case-insensitive; m makes ^ and $ match at line boundaries instead of just the start and end of the whole text.

Why does my regex work here but not in my Java/Python code?

Small dialect differences exist: lookbehind support, Unicode classes, and escaping rules vary by language. This tester is authoritative for JavaScript; test in the engine you deploy to if the pattern is critical.

Is my test text uploaded anywhere?

No. Matching runs entirely in your browser, so pasting production logs or sensitive strings is safe.

Related tools

PureKit · regex · Free online tool — files processed locally in your browser, no upload.