ChistStudioChistStudio

Port 05 — dev & security

Regex Tester

Enter a pattern and sample text. Matches are highlighted below as you type, using your browser's native JavaScript regex engine.

regex-tester
That pattern isn't a valid regular expression.
Ad slot — in-content unitReplace with <ins class="adsbygoogle"> once AdSense is approved

How to use this tool

Type a pattern in the first field and your test string in the larger box below — matches highlight immediately as you type, no button to press. Add flags in the second field: g for all matches, i for case-insensitive, m for multiline anchors.

Common patterns worth knowing

Frequently asked questions

What do the regex flags g, i, and m mean?

g finds all matches instead of stopping at the first. i makes matching case-insensitive. m makes ^ and $ match the start and end of each line instead of the whole string.

Why does my pattern match nothing even though it looks correct?

Common causes: forgetting to escape special characters like . or (, greedy quantifiers consuming more than expected, or missing the g flag when multiple matches are expected.

What regex flavor does this tool use?

The native JavaScript RegExp engine built into your browser, following the ECMAScript spec. Behavior may differ slightly from PCRE, Python's re, or POSIX regex elsewhere.

Related tools