Regex Tester

Write a pattern, paste some text, and watch matches highlight instantly. Inspect numbered and named capture groups, test replacements, and see syntax errors without leaving the page.

Free Runs locally No signup
2 matches
Contact kotlinamai@example.com or support@amai.tools for help.
matches2
  1. #1kotlinamai@example.com@8
  2. #2support@amai.tools@34
Result
Contact  or  for help.
Text is capped at 50,000 characters. Matches update as you type.

How to use it

1

Enter a pattern

Type the expression without the surrounding slashes, then toggle the flags you need.

2

Paste your text

Add the text to test. Matches highlight immediately and are listed with their positions.

3

Inspect or replace

Open the match list to see capture groups, or type a replacement to preview the result.

Why use this tool

Live highlights

Every match is highlighted in the text as you type, so you can see exactly what the pattern captures.

Capture groups

Numbered and named groups are listed for each match, which makes debugging complex patterns faster.

Errors explained

Invalid patterns show the browser error message instead of silently failing.

Frequently asked questions

Which regex flavour is used?
JavaScript regular expressions, the same engine that runs in Node.js and browsers. It supports lookbehind, named groups, Unicode property escapes and the sticky flag.
What do the flags mean?
g finds every match, i ignores case, m makes ^ and $ match line boundaries, s lets the dot match newlines, u enables Unicode mode and y anchors each match at the previous end position.
Why do I only see one match without the g flag?
That is how JavaScript behaves: without g, the first match is returned and scanning stops. Turn on g to list every match.
Can a pattern freeze the page?
Possibly. The tester limits the input size and caps the number of stored matches, but it does not interrupt a pattern that is already running, so avoid nested quantifiers such as (a+)+ on long text.
Is the text I paste uploaded?
No. The pattern and the text stay in your browser, and nothing is logged or sent to a server.

Related tools

Last updated: