Regex Tester

Build, test and debug regular expressions with live highlighting — every match runs in your browser.

/ /
Flags
idle

Matches detail

#IndexMatch & groups
Regex cheatsheet (JavaScript)
.Any character except newline (without s flag) \d \w \sDigit, word char ([A-Za-z0-9_]), whitespace \D \W \SNegations of the above ^ $Start / end of input (per line with m) \b \BWord boundary / non-boundary [abc] [^abc]Character class / negated class a* a+ a?0+, 1+, 0 or 1 of a a{2,5}Between 2 and 5 of a (abc)Capturing group → backref $1 (?<name>abc)Named group → backref $<name> (?:abc)Non-capturing group (?=abc)Positive lookahead (?!abc)Negative lookahead (?<=abc)Positive lookbehind a|bAlternation \\Escape a literal metacharacter
0
Matches
0
Groups captured
0
Characters tested
0ms
Match time

What is this regex tester?

This is a free online regex tester that lets you build, test and debug JavaScript regular expressions with real-time match highlighting, group capture inspection and a quick-reference cheatsheet — all in your browser, with no data ever uploaded.

How do I test a regular expression online without installing anything?

Type or paste your regex in the pattern box, add test text underneath, and matches are highlighted as you type. Capture groups, indices and replacement previews update live — entirely client-side.

Key features

Live match highlighting
Every match in your test string is highlighted instantly as you edit the pattern or text, with separate colours for capture groups.
Flag toggles
Switch between g, i, m, s, u and y flags with checkboxes and see the impact on matches immediately.
Replacement preview
Provide a replacement template ($1, $2, named groups) and see the resulting string side-by-side with the original.
Cheatsheet panel
A compact reference for character classes, quantifiers, look-arounds and Unicode properties keeps the common syntax one click away.

How to use it

Type the regular expression in the pattern field, toggle flags as needed, then paste sample text below. Matches are highlighted instantly, and the groups panel shows each capture. For substitutions, switch to the Replace tab and write a template.

Frequently asked questions

Which regex engine does it use?

Your browser's native ECMAScript RegExp engine, the exact same implementation used by Node.js and modern JS runtimes.

Does it support look-behind and Unicode properties?

Yes — modern browsers support look-behind ((?<=…), (?<!…)) and Unicode property escapes (\p{Letter}) and so does this tool.

Will it warn me about catastrophic backtracking?

Patterns are run against your text in your tab. If a pattern takes too long, the tab pauses; clear the test text and simplify the pattern to recover.

Toolbox uses the browser's built-in RegExp implementation so the behaviour matches the ECMAScript specification developers see in their real code, and there is no custom engine to fall out of sync.