Regex Tester
regex-test• Enter a pattern and flags to highlight matches in real time. • Inspect capture groups, preview replacements, and use common pattern presets.
All matching runs in your browser. Without the global (g) flag only the first match is captured. Replacement supports $1·$2 (groups), named groups, and $& (whole match).
When a regex tester helps
A regular expression is a notation for finding patterns in text. It is used for validating an email format, pulling one value out of a log line, or doing a rule-based find and replace.
The trouble is that you cannot tell whether a pattern is right just by looking at it, and editing it inside your code means a slow run-and-retry loop. Paste the pattern and the target text here and the matches are highlighted immediately, so you can adjust and check as you go.
Try the flags as well: g finds every match, i ignores case and m handles multiple lines. Patterns here follow JavaScript syntax, so a few constructs differ in other languages. Your input is processed only in your browser.