DevNb

Regex/Regex Tester

Regex Tester

Write a regular expression and see every match highlighted in real time. Inspect captured groups, test replacements, and toggle flags — all in your browser.

//g
Flags:

🔒All matching runs locally in your browser. Nothing leaves your device.

Test String3 lines139 chars
8 matches

Highlighted Matches

Ada Lovelace invented the first computer algorithm. Charles Babbage designed the Analytical Engine. Grace Hopper coined the term debugging.

Match List

#IndexMatch
10–3Ada
24–12Lovelace
352–59Charles
460–67Babbage
581–91Analytical
692–98Engine
7100–105Grace
8106–112Hopper

How to use this tool

Enter a pattern in the top field and your test text in the left pane. Matches are highlighted in real time on the right. Use the flag buttons to toggle global (g), case-insensitive (i), multiline (m), dotAll (s), and Unicode (u) modes.

Switch to the Replace tab to apply a replacement string. Use $& to insert the whole match, $1 for the first capture group, and so on — the same syntax as JavaScript's String.prototype.replace.

The match list shows the start and end index of every match plus any captured groups or named groups.

FAQ

Is my text sent anywhere?

No. All matching is done with the browser's built-in RegExp engine. Nothing is transmitted.

What regex flavour is this?

JavaScript (ECMAScript) regex. It supports lookaheads, lookbehinds (ES2018+), named capture groups ((?<name>…)), and Unicode categories with the u flag. It does not support PCRE extensions like recursive patterns or conditionals.

Why do I see “empty” matches?

Patterns like a* can match zero characters between every position. The tester still displays them and advances the cursor by one to avoid an infinite loop.

Is there a match limit?

The tester caps at 5,000 matches to keep the UI responsive. The full match count is always shown even if only 200 rows are displayed in the table.

Need to escape special regex characters in a string? Try String Escape / Unescape →