Skip the island and read the website

Regex Tester — Test Regular Expressions Live

← Circuit CoveThe Creative Island · Island 08

Paste a pattern, paste your text — every match lights up. Case-sensitivity and global flags included.

How to use this tool

  1. Type your pattern without the surrounding slashes.
  2. Choose flags: g finds all matches, i ignores case, m makes ^ and $ match line ends.
  3. Watch matches highlight live as you type; errors explain themselves.

Example

Pattern \b\w+@\w+\.\w+\b on the sample text highlights both email addresses. Try \d+ to catch numbers, or ^(.{0,20}) with the m flag to grab line starts.

The formula

matches = String.prototype.matchAll semantics, with zero-length-match protection

What the result means

Every highlighted span is one match, in order, exactly where the engine found it. The match list shows what the regex actually captured — often revealing that a pattern is greedier or looser than intended. If the badge says INVALID, the message is the engine's own diagnosis.

Frequently asked questions

Why doesn't my pattern with slashes work?

Enter only the pattern itself — /pattern/flags is JavaScript syntax; this tool takes the pattern in the box and flags from the dropdown.

What is a zero-length match and why guard it?

Patterns like \b or (?=x) can match empty strings; without protection the engine loops forever at the same spot. The tool steps past such matches safely.

Can I use capture groups?

Yes — JavaScript syntax ($1, named groups) all work; the highlight shows full matches, and groups are visible when you use them in your own replacement code.

Is my text or pattern uploaded?

No — the engine runs in your browser; logs, keys and secrets stay on your device (though as a habit, avoid pasting real secrets into any web page).

More tools from Circuit Cove

Explore the island world

Comments