Skip to content
⌁DevKit Labs

Regex Tester & Debugger

Test regular expressions with live match highlighting, capture groups and replace — 100% in your browser.

//g
·Examples:
Test string0 matches

About Regex Tester & Debugger

Type a pattern and test string and matches highlight live as you go, with adjacent matches in alternating colors. The match panel breaks down every result with its position, numbered capture groups and named groups (?<name>…), so you can debug a pattern quickly.

Toggle the JavaScript flags — global, ignore-case, multiline, dotall, unicode and sticky — and switch on Replace to preview substitutions using $1, $<name> and $& references. A ready-to-copy JavaScript snippet is generated from your pattern. Everything runs locally with the browser's own regex engine; your patterns and text are never uploaded.

How to use Regex Tester

  1. Enter the pattern without surrounding JavaScript slashes, choose the flags and paste test text.
  2. Inspect each match and its numbered or named groups; include examples that should not match as well.

Limitations and common mistakes

Patterns use JavaScript regular-expression semantics. Lookbehind, Unicode handling and flags can differ from Python, PCRE, Java or a database engine.

Some patterns take excessive time on long input. Test unfamiliar patterns against a short synthetic string first and do not assume the tool can prove a pattern safe for production.

The tool processes its input locally on your device. Read our privacy policy for analytics, storage and network details.

Extract a date with named groups

Input
Pattern: (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})  ·  Text: 2026-06-29
Output
Match: 2026-06-29 · year=2026 · month=06 · day=29

Named groups appear alongside numbered groups in the match details.

Frequently asked questions

Which regex flavor does it use?

It uses your browser's native JavaScript (ECMAScript) regular expression engine, so behavior matches what you'll get in JS code.

Does it support capture and named groups?

Yes. Numbered groups and named groups written as (?<name>…) are both listed for every match, including which groups were undefined.

Can I preview a replace/substitution?

Yes. Open the Replace section and use $1, $2, $<name> for group references and $& for the whole match to see the substituted result instantly.

Which flags are supported?

g (global), i (ignore case), m (multiline), s (dotall), u (unicode) and y (sticky) — toggle any combination.

Is my data uploaded anywhere?

No. All matching happens locally in your browser; nothing is sent to a server.

For related tasks, explore Text Diff and Case Converter. Their guides explain the different inputs, assumptions and output formats.

Related tools

References