Skip to main content

Free tool by GoodAI Life

Regex Tester: Test Regular Expressions with Live Highlighting

Type a pattern, toggle flags and paste your test text to see every match highlighted instantly, together with its position and capture groups.

Flags

Highlighted text

2 match(es)
Contact: [email protected], [email protected]

Matches

  1. Group 1
    alice
    Group 2
    example.com
    Named group user
    alice
    Named group host
    example.com
  2. Group 1
    bob.smith
    Group 2
    mail.example.org
    Named group user
    bob.smith
    Named group host
    mail.example.org

How to use the tester

Enter a pattern between the slashes, choose flags with the checkboxes and write or paste text below. Matches are highlighted in the preview and listed with their index.

If the pattern is invalid, the engine's error message is shown so you can fix it right away.

Flags explained

  • g (global) finds every match instead of only the first.
  • i (ignore case) treats upper and lower case as equal.
  • m (multiline) lets ^ and $ match at each line.
  • s (dotAll) lets the dot match line breaks.
  • u (unicode) enables full Unicode matching.

Capture groups

Parentheses create numbered groups, and (?<name>...) creates a named group. Each match lists every group so you can check what your pattern really captures before using it in code.

Frequently asked questions

Which regex flavor does this use?+

It uses the JavaScript RegExp engine of your browser, so results match what you get in JavaScript and TypeScript. Other languages may differ slightly.

Is my text uploaded anywhere?+

No. Everything runs locally in your browser and nothing is sent to a server.

Why do I see an empty match?+

Patterns such as a* can match zero characters. The tester shows these as empty matches and moves on, so it never gets stuck in a loop.

Related tools

Looking for AI tools with demo videos?

Browse GoodAI Life