Regular expression tester

Enter the pattern, flags and text to search. Matches are listed with their position.

Regular expression tester

Without slashes: \d+ rather than /\d+/.
g, i, m, s, u, y, d or v.

Result

2Matches

No. 1 (index 8)
2026-10-11 → 2026 | 10 | 11
No. 2 (index 26)
2026-11-02 → 2026 | 11 | 02

Regular expression tester

Inputs

Regular expression
(\d{4})-(\d{2})-(\d{2})
Flags
g
Test text
Release 2026-10-11, patch 2026-11-02.

How it is calculated

The pattern is compiled with the browser’s JavaScript RegExp engine.

Result

Matches

2
No. 1 (index 8)
2026-10-11 → 2026 | 10 | 11
No. 2 (index 26)
2026-11-02 → 2026 | 11 | 02

How it is calculated

  1. The pattern is compiled with the browser’s JavaScript RegExp engine.
  2. Without the g flag, only the first match is searched.
  3. The first 20 matches are listed with their captured groups.

Example

The pattern (\d{4})-(\d{2})-(\d{2}) finds 2 dates in “Release 2026-10-11, patch 2026-11-02.”.

Good to know

  • Syntax is JavaScript’s; PCRE, Python or Java differ in places.
  • A badly built pattern can be very slow on long text.

Frequently asked questions

What is this tool used for?

Enter the pattern, flags and text to search. Matches are listed with their position.

How is the result calculated?

The pattern is compiled with the browser’s JavaScript RegExp engine.

What should I check before using the result?

Syntax is JavaScript’s; PCRE, Python or Java differ in places.

Updated October 11, 2026

Indicative result. For an important decision, check with a professional.