SYSTEM TIME --:--:-- IST · 152 TOOLS LIVE · RUNS IN YOUR BROWSER — NOTHING UPLOADED
← Back to DEVELOPER
DEVELOPER

Regex Tester

Test a regular expression against sample text and see every match.

About this tool

This tool runs a JavaScript regular expression against a block of text and lists every match with its position, so you can check a pattern is doing what you expect before dropping it into code.

Enter a pattern and optional flags (g for global — required to see every match rather than just the first — i for case-insensitive, m for multiline). The tool re-evaluates on every keystroke, so you can adjust the pattern and immediately see how the match list changes.

If your pattern includes capture groups, each match also shows the captured sub-values, which is useful when you are extracting a piece of a larger string rather than matching the whole thing.

Frequently asked questions

Why do I only see one match when I expect several?

Add the g (global) flag. Without it, JavaScript regex only returns the first match.

What flavor of regex does this use?

JavaScript’s native RegExp engine (ECMAScript regex), which differs slightly from PCRE or Python’s re module in some edge cases like lookbehind support in older environments.

Does this test multiline patterns correctly?

Add the m flag to make ^ and $ match the start/end of each line rather than the whole string.

More scenarios

Related tools