How to test a regular expression online
Type a pattern in the box (without surrounding slashes — the tool adds them visually) and your test text below it. Matches highlight live on every keystroke, the table lists each match with its position and capture groups, and the explainer breaks the pattern into plain English piece by piece. Toggle flags with the checkboxes: g for all matches, i for case-insensitive, m for line-by-line anchors, s for dot-matches-newline, u for Unicode, y for sticky matching.
This tester uses the JavaScript (ECMAScript) regex flavor — the exact engine browsers and Node.js run, so what works here works in your frontend and Node code unmodified. Add a replacement string to preview String.replace() output including $1/$<name> references. Everything is evaluated locally by your browser; your text is never uploaded.
Beware catastrophic backtracking: nested quantifiers such as (a+)+b can freeze any regex engine on non-matching input. Keep quantifiers specific, avoid nesting them, and test edge cases here first. Cleaning data afterwards? Try the Text Diff Checker or JSON Formatter.