Ads disabled until consent granted.

Browser tool

Regex Tester

Build and debug regular expressions with instant match explanations.

Debug regular expressions with immediate feedback. Toggle flags, inspect capturing groups, and validate RE2 compatibility without leaving your browser.

Key points

Live match highlighting

See matches update instantly as you type. Highlighted previews make it easy to spot exactly what your pattern captures.

Flag and capture insights

Toggle the most common flags, review captured groups, and inspect named groups so you can fine-tune API-ready patterns.

RE2 compatibility checks

Enable RE2 safety mode to guard against catastrophic backtracking and unsupported syntax before embedding patterns in production.

Flags

0 characters1 lines
Matches: 0 • Captured groups: 0

Highlighted matches

Add sample text to see highlighted matches.

Match details

No matches detected yet. Adjust your pattern, flags, or sample text to try again.

Ads disabled until consent granted.

How to use this tool

  1. Step 1

    Write or paste your pattern

    Use the pattern input to craft your regular expression. Turn flags on or off to mimic your target runtime environment.
  2. Step 2

    Add sample text to evaluate

    Paste logs or payloads into the sample text area. Matches highlight in real time and the summary shows capture details.
  3. Step 3

    Share or harden the results

    Copy matches as JSON, enable RE2 compatibility for safer execution, and send a share link that recreates the current session.

Frequently asked questions

How accurate is the RE2 safety mode?
The checker looks for constructs that RE2 rejects, including lookbehinds, backreferences, and nested quantifiers that trigger catastrophic backtracking. Adjust patterns until the warning disappears before using them in RE2 environments.
Does the tool execute my text on a server?
No. All evaluation happens client-side with XRegExp so your test strings and matches stay in the browser. Share links encode the pattern and sample text with base64url.
Can I test Unicode-heavy patterns?
Yes. Enable the Unicode flag to treat astral code points and character classes correctly. The tool highlights matches using your browser’s Unicode support.

Share links encode your pattern and sample text directly in the URL. Remove secrets before sharing and avoid using pathological expressions that could freeze older browsers.

Regex Tester — WebUtility.org | WebUtility.org