Home › Regex tester
Regex tester
Test regular expressions live: highlighted matches, capture groups, flags and replace preview. JavaScript regex engine, runs locally.
🔒 Runs 100% in your browser — safe for real dataMatches
How to use the regex tester
- Enter your regular expression and pick flags.
- Paste a test string — matches highlight live.
- Optionally enter a replacement to preview the result.
About this tool
Type a pattern and test string to see every match highlighted, with indexes and capture groups listed in a table. Toggle flags: g global, i ignore case, m multiline anchors, s dot matches newline, u Unicode. The replace box previews String.replace output using $1-style references.
Cheat sheet
\ddigit,\wword character,\swhitespace.any character,^start,$end*0+,+1+,?optional,{2,5}range(…)capture group,(?:…)non-capturing,a|balternation
FAQ
Is my data sent to a server?
No. DevKnife tools run entirely in your browser with JavaScript. Nothing you paste — API keys, tokens, customer data — is transmitted or logged, so it is safe for production data.
Which regex flavor is this?
JavaScript (ECMAScript). It is very close to PCRE for common patterns; lookbehind and named groups are supported in modern browsers.