Regular expression tester
Enter the pattern, flags and text to search. Matches are listed with their position.
Result
2Matches
- No. 1 (index 8)
- 2026-10-11 → 2026 | 10 | 11
- No. 2 (index 26)
- 2026-11-02 → 2026 | 11 | 02
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
- No. 1 (index 8)
- 2026-10-11 → 2026 | 10 | 11
- No. 2 (index 26)
- 2026-11-02 → 2026 | 11 | 02
How it is calculated
- The pattern is compiled with the browser’s JavaScript RegExp engine.
- Without the g flag, only the first match is searched.
- 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.