Regex Tester

Test a regular expression against your own text, highlight every match and inspect capture groups.

100% private — everything runs in your browser

How to Use

  1. 1

    Type or paste a pattern in the expression field.

  2. 2

    Add optional flags: i for case-insensitive, m for multiline, s so dots match newlines, u for Unicode.

  3. 3

    Paste your test text — matches are highlighted and listed with their positions.

  4. 4

    Check the groups listed next to each match to see what every pair of brackets captured.

Examples

Find email addresses

Input

\b\w+@\w+\.\w+\b in “write to [email protected]”

Output

[email protected] at position 9

Capture date parts

Input

(\d{4})-(\d{2})-(\d{2}) in “2026-10-21”

Output

Full match 2026-10-21, groups: 2026, 10, 21

FAQ

Why does my pattern show an error?

The JavaScript RegExp engine rejects unbalanced brackets and invalid escapes. The message appears above the results instead of failing silently.

Which flags are enabled?

The global flag is always on so every match is collected. You can toggle i, m, s and u on top of that.

Is this the same syntax as Python or PHP?

It uses JavaScript (ECMAScript) regular expressions. Most syntax is shared, but lookbehind, named groups and escaping can differ from other languages.

Related Tools