Small Tools
Regex utility

Regex Tester

Test a regular expression against sample text and inspect matches.

● This tool runs entirely in your browser. Your input is never uploaded to our servers.

Use short sample text. Complex patterns can take a long time to run.

Output
Your result will appear here…

How to use Regex Tester

  1. Enter a JavaScript pattern without surrounding / delimiters and choose flags.
  2. Paste test text and select Test.
  3. Review matches against both expected and unexpected input.

Example

Input / settings:

Pattern: \d+
Flags: g
Text: Order 42, retry 7

Output:

Matches: 2
42 (index 6)
7 (index 16)

When to use

Overview

Regular expressions describe text patterns. This tester uses JavaScript RegExp and reports matching text with its index, helping you inspect actual matches instead of guessing from the pattern.

Supported input

pattern, flags, and text

Output details

match results

Common mistakes

Practical tips

Privacy and security

This tool runs entirely in your browser. Your input is never uploaded to our servers. Matching happens locally. Avoid testing untrusted patterns against sensitive or large text; an expensive pattern can block the browser.

Frequently asked questions

Does this use Python or PCRE syntax?

No. It uses the JavaScript regex engine in your browser.

What do match indices count?

JavaScript string offsets are UTF-16 code units, which can differ from visible-character counts.

Why are several matches shown without g?

The tester adds global matching for its report. Do not assume a single-match application API behaves the same way.

Related tools