← All Tools
Regex Tester & Debugger
Flags:
Pattern & Options
Pattern
/ /
Enter a pattern above
Replace (optional)
Test String
Matches Highlighted
Enter a regex pattern to see matches

Free Online Regex Tester — Test Regular Expressions Instantly

Test, debug and validate regular expressions against any text string in real time. Matches are highlighted as you type — no button clicks, no waiting.

🔦

Live Match Highlighting

Every match is highlighted in the test string the moment you type. Colour-coded per match group so overlapping patterns are immediately clear.

🎯

Named Capture Groups

Use (?<name>...) syntax to name your groups. The Groups panel shows each capture's value, making complex patterns easy to debug.

🔄

Replace Preview

Enter a replacement string using $1, $2 or $<name> references. See the full substituted result below the match view without writing a single line of code.

📖

Built-in Cheatsheet

Forget syntax? Click Cheatsheet for an inline quick-reference of character classes, quantifiers, anchors, groups and lookarounds — without leaving the page.

Frequently Asked Questions

What regex flavour does this tester use?
This tester uses JavaScript (ECMAScript) regular expressions — the same engine used in Chrome, Firefox, Node.js and all modern browsers. It supports named capture groups (?...), lookahead, lookbehind, and the Unicode flag.
What do the flags mean?
g=global (find all matches, not just the first), i=case insensitive, m=multiline (^ and $ match line starts/ends), s=dot-all (. matches newlines too), u=Unicode mode for full Unicode support.
How do I see capture groups?
The Groups panel below the match count shows each numbered and named capture group value from the first match. Named groups use (?...) syntax.
Can I test a replace operation?
Yes — the Replace tab lets you enter a replacement string using $1, $2 or $ for group references. The preview shows the full result of applying the replacement to your test string.
Why does my regex work in code but not here?
Make sure you are not wrapping the pattern in forward slashes — enter the pattern without delimiters. Select the correct flags. This tool uses JavaScript regex, which may differ slightly from Python (re module) or PCRE.
Is there a regex cheatsheet?
Yes — click the Cheatsheet button in the toolbar to open a quick reference covering character classes, quantifiers, anchors, groups and lookarounds.