Skip to main content
Calnex LogoCalnex
Developer Tools

Regex Tester

Test JavaScript regular expressions with flags, inspect capture groups and find matching text. The result list stops at 100 matches.

Parameters

Enter the regex pattern without delimiters.

The string to test your regex against

Regex flags: g (global), i (case-insensitive), m (multiline).

Results

Regex Status
VALID ✓

The regex pattern is not valid

Other results (5)
Has Match
YES ✓

The pattern matched the test string

Match Count2

Total number of matches found

Match List
1. "Hello World, hello regex!" (at index 0)
2. "" (at index 25)

Showing 2 matches

Matched TextsHello World, hello regex!,

All matched substrings

Escaped Pattern (for literal match)
\.\*

Pattern with special characters escaped for a literal string match

Example input and result

/\d+/g
Order 42, item 7
42, 7

Why Choose Regex Tester

Test JavaScript regular expressions with flags, inspect capture groups and find matching text. The result list stops at 100 matches.

How to Use

  1. 1Enter the JavaScript regex pattern without slash delimiters.
  2. 2Enter the test string and flags.
  3. 3Inspect the match list and capture groups; at most 100 matches are shown.

Frequently Asked Questions (FAQ)

Which regex engine is used?

This tool uses your browser’s JavaScript RegExp engine. PCRE, Python and .NET syntax can differ. Enter the pattern without surrounding slash delimiters; enter g, i, m, s or u in the flags field.

Why does the match count stop at 100?

The displayed list is capped at 100 matches. It is a preview, so the reported count may be smaller than the total number of matches in your text.

Are replacement previews supported?

This page shows matches, capture groups and an escaped literal pattern. It does not provide a replacement input or replacement preview.

Authoritative References & Sources

MDN — JavaScript RegExp

View Source