Regex Tester & Debugger

Pattern
Flags

Matches

2 match(es)
Match #1Index 15
https://devref.cc
Group 1: https://devref.cc
Match #2Index 36
http://example.com
Group 1: http://example.com
Test Text
Loading...
100% Client-Side • Zero Data Sent to Servers

Online Regular Expression (Regex) Tester & Debugger

Build, validate, and debug regular expressions with instant syntax highlighting and capture group breakdowns.

Local Processing & Data Privacy

All formatting, parsing, decoding, and validation executes entirely within your browser using modern Web APIs and JavaScript. Your tokens, JSON payloads, regex inputs, and queries never leave your computer.

About this Tool

Regular expressions (regex) are essential for parsing log lines, validating user inputs (emails, URLs, phone numbers), performing search-and-replace, and data extraction. Writing complex patterns with lookarounds, non-capturing groups, and quantifiers can be error-prone without instant visual feedback.

DevRef's Online Regex Tester compiles and runs your regular expression against sample text in real time. It highlights every match, details numbered and named capture groups, and warns you of invalid syntax or catastrophic backtracking patterns. Because testing often involves real customer logs or sensitive strings, evaluation executes entirely client-side.

How to Use

  1. 1Enter Regex Pattern: Type your regular expression pattern into the pattern input bar (e.g. ([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})).
  2. 2Configure Flags: Toggle flags such as Global (g), Case-Insensitive (i), Multiline (m), and DotAll (s) to match your target behavior.
  3. 3Paste Test String: Insert sample text, multi-line logs, or payload strings into the test area.
  4. 4Inspect Matches & Groups: Review the highlighted matches and check the capture group table to inspect matched substrings and offsets.

Key Features

  • •Real-time JavaScript (ECMAScript) RegExp evaluation engine
  • •Visual color-coded match highlighting with character offsets
  • •Detailed capture group inspector (numbered and named groups)
  • •Flag toggle support: global (g), case-insensitive (i), multiline (m), dotAll (s), and unicode (u)
  • •100% private in-browser evaluation: log text and expressions are never uploaded to any server

Frequently Asked Questions

What regex flavor does this tool use?

This tool runs the modern ECMAScript (JavaScript) regular expression engine native to your browser, which supports lookahead, lookbehind, named capture groups, and unicode property escapes.

What does the 'g' flag do?

The global flag (g) finds all matches in the text rather than stopping after the first occurrence.

What does the 'm' (multiline) flag change?

The multiline flag causes '^' and '$' anchors to match the start and end of each individual line instead of only the start and end of the entire string.

Are my test strings or patterns stored or logged?

Never. Everything runs locally in your browser session. No data is sent to or stored on DevRef servers.