Skip to content

REGEX TESTER

Test regular expressions
with clear results.

Enter a pattern, flags, and test text to inspect every match and its position locally in your browser.

Test text

Your result will appear here.

WHY THIS TOOL

Key features

01

Match positions

For A12 B34 with \d+, results show 1: 12 and 5: 34.

02

JavaScript flags

Enter flags such as i; the tester searches all matches even without g.

03

Long-run protection

A pattern that runs too long is stopped in a separate worker.

HOW TO USE

How to use it

Add your input, run the tool, then check the result.

  1. 1

    Enter a pattern and any flags.

  2. 2

    Paste test text and select Test regex.

  3. 3

    Review each match and its starting character position.

FAQ

Frequently asked questions

Do I need the g flag for all matches?

No. The tester searches all matches even if g is omitted.

How are match positions counted?

They are zero-based JavaScript string indexes.

What if a pattern takes too long?

The test is stopped and a timeout message appears.