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
Next in your workflow
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
- Cron expression parser Explain a cron schedule in plain English and list the next times it will run.
- Chmod calculator Work out Unix file permissions in octal and symbolic form by ticking boxes.
- HTTP status codes Look up what any HTTP status code means and when to use it.
- HTML minifier Remove comments and collapse whitespace in HTML.
- CSS minifier Remove comments and unnecessary whitespace from CSS.
- JavaScript minifier Minify JavaScript onto one line with Terser: strips comments and spaces, shortens local names and simplifies code.