LazyTools

🔒 Every tool runs in your browser — the files and values you enter are never uploaded to any server. How it works

🧩 Regex Tester

Type a pattern, paste test text, see every match with its position and capture groups — updated on every keystroke.

2 matches

Rate this tool:
Anonymous — no account, no identifier

How the regex tester works

The pattern runs as a real JavaScript RegExp against your text, listing each match with its index and any capture groups — the exact behavior your JS code will see, because it is the same engine. Flags work as in code: g (all matches — applied automatically), i (case-insensitive), m (multiline ^ $), s (dot matches newline), u (unicode).

Testing here mirrors JavaScript exactly, which is both the feature and the caveat: JS regex differs from PCRE/Python in places (lookbehind support, named groups syntax, no possessive quantifiers). For patterns destined for another language, verify in that ecosystem too.

Frequently asked questions

Which regex flavor is this?

JavaScript (ECMAScript) — the same engine as your browser and Node code. Most syntax is shared with PCRE/Python, but edge features differ; test in the target language for anything exotic.

What do the flags mean?

g = all matches, i = ignore case, m = ^ and $ match per line, s = . matches newlines, u = full Unicode. This tester always applies g so you see every match.

How do capture groups show up?

Parentheses create groups, listed per match in order — the sample splits emails into user and domain. Use (?:…) for grouping without capturing.

Why does my pattern error?

Unbalanced parentheses/brackets or a dangling quantifier, usually. The error message is the engine's own. Escape literal special characters with a backslash.

Is my test data private?

Yes — matching runs locally. Paste logs and real data freely; nothing is transmitted.

Related developer tools