Text

Regex Tester – Free Online Regular Expression Tester

Write a regular expression pattern, toggle flags (g, i, m, s), and see every match highlighted in real-time. View match index, value, and capture groups for each result.

//g
Hello World! The Quick Brown Fox Jumps Over The Lazy Dog.
1

"Hello"

Index: 0

2

"World"

Index: 6

3

"The"

Index: 13

4

"Quick"

Index: 17

5

"Brown"

Index: 23

6

"Fox"

Index: 29

7

"Jumps"

Index: 33

8

"Over"

Index: 39

9

"The"

Index: 44

10

"Lazy"

Index: 48

11

"Dog"

Index: 53

How to Use

  1. 1

    Enter your regex pattern

    Type your regular expression in the pattern field (without the / delimiters).

  2. 2

    Toggle flags

    Enable g (global), i (case-insensitive), m (multiline), or s (dot-all) flags as needed.

  3. 3

    Paste your test string

    Type or paste the text you want to test the regex against in the Test String area.

  4. 4

    Inspect matches

    Matches are highlighted in the result area. Scroll the match list to see index and capture group details.

Frequently Asked Questions

What regex flavor is used?+

This tool uses JavaScript's built-in RegExp engine, which follows the ECMAScript regex specification. It supports lookaheads, named groups, and Unicode patterns.

What are capture groups?+

Capture groups are portions of the regex pattern enclosed in parentheses (e.g., (\d+)). The matched text for each group is shown separately in the match details.

Why use the 'g' flag?+

The global flag (g) makes the regex find ALL matches in the test string. Without it, only the first match is returned.

Can I test multi-line patterns?+

Yes. Enable the 'm' (multiline) flag to make ^ and $ match the start/end of each line rather than the whole string.