DevToolsLab

Regex Tester

Real-time matching

Test regex patterns in real time with match highlighting, capture groups, and presets.

//
Test string2 matches
Highlighted
Sample dates: 2026-05-14, 2025-12-31, and not-a-date 99-99-99.
Matches2
#1 @142026-05-14
#2 @262025-12-31

Pattern and test text never leave your browser.

What is a Regex Tester?

A regex (regular expression) tester lets you build and verify a pattern against sample text in real time, instead of trial-and-error inside your application. DevTools Lab's Regex Tester highlights every match, lists capture groups, and ships with presets for common patterns (email, URL, Japanese postal code, hex color). All matching runs in the browser using the JavaScript regex engine, so results match exactly what you'd get in JS โ€” and notes are provided for Java and Python compatibility.

Features

  • Real-time match highlighting as you type
  • Capture group listing per match
  • Standard flags: g, i, m, s, u, y
  • Presets: email, URL, Japanese postal code, date, hex color
  • Compatibility notes for JavaScript / Java / Python
  • Browser-only โ€” no data leaves your device

How to use

  1. Enter a pattern in the regex input (without slashes).
  2. Add flags such as g (global) or i (case-insensitive).
  3. Paste your test string in the right panel.
  4. Matches are highlighted live and listed with their capture groups.

Frequently Asked Questions

Which regex flavor is used?

โ–พ

JavaScript / ECMAScript. Notes are shown for differences in Java and Python (such as look-behind support).

Are my pattern and test text sent anywhere?

โ–พ

No. Matching runs entirely inside your browser via the native JS RegExp engine.

Does it support look-behind?

โ–พ

Yes, in modern browsers (Chrome, Firefox, Safari, Edge โ€” anything from 2019 onward).

Why doesn't my pattern match anything?

โ–พ

Common causes: missing the g flag (so only the first match shows), forgetting to escape special characters (. * + ? ( ) [ ] { } \), or anchors (^ $) when working with multi-line text without the m flag.

Can I save my patterns?

โ–พ

Patterns are not stored on a server. Use your browser bookmarks or the URL hash (planned feature) to save tests.

Related tools

Canonical: https://devformatlab.com/en/regex-tester