Regex tester
Test a regular expression against your text, with matches and capture groups highlighted live.
In your browser
/
/
Matches
| # | Match | |
|---|---|---|
Replace
Use $1, $2 for groups
About this tool
Write and debug regular expressions against sample text. Matches are highlighted as you type, capture groups are listed in a table, and you can preview replacements with $1 and $2.
How to use it
- 1 Type your regular expression and choose flags.
- 2 Paste test text.
- 3 Check the highlighted matches and groups.
Questions
Which regex flavour is used?
JavaScript (ECMAScript) regular expressions, the same as in browsers and Node.js.
Is my data uploaded?
No. This tool runs in your browser, so your text and files never reach our server.
Is this tool free?
Yes. It’s free to use with no sign-up and no limits for normal use.
More in Code & markup
- Chmod calculator New Work out Unix file permissions in octal and symbolic form by ticking boxes.
- Cron expression parser New Explain a cron schedule in plain English and list the next times it will run.
- HTTP status codes New Look up what any HTTP status code means and when to use it.
- JSON to TypeScript New Generate TypeScript interfaces from a sample JSON object.
- JavaScript minifier New Minify JavaScript onto one line with Terser: strips comments and spaces, shortens local names and simplifies code.
- BBCode to HTML Convert forum BBCode ([b], [url], [img]…) to HTML.