Regex tester
Find matches, inspect capture groups and test replacements using JavaScript regular expressions.
Bookmark this page
Keep this page handy for next time.
- On a computer
- Press Ctrl + D, or Command + D on a Mac.
- On a phone or tablet
- Open your browser's menu or Share menu and look for Add Bookmark, Bookmark or Add to favourites.
A bookmark saves the page link. Save any tool results separately.
How to use this tool
- Find matches, inspect capture groups and test replacements using JavaScript regular expressions.
- Adjust the labelled settings, then run the tool. Copy the result or download it as a file.
Things to know
- Processing is local. Supplied code and network requests are never executed. Input and text settings are limited to 5 MiB combined; text settings alone are limited to 1 MiB.
- Uses JavaScript syntax. Patterns are limited to 10,000 characters, matching/replacement to 10,000 matches and output to 10 MiB. Expensive expressions stop after three seconds of execution; Cancel stops them sooner.
- Patterns: 10,000 characters and 250 capture groups. Potential captured text is preflighted at 25 MiB; replacement text is limited to 256 KiB. Matches/replacements: 10,000; result: 10 MiB. A worker deadline stops expensive expressions after three seconds.
You might also need
More in web developmentRobots.txt builder and tester
Test whether a supplied robots.txt permits a crawler to visit a URL.
CSS selector tester
Find matching elements in pasted HTML without rendering the supplied page.
Semantic version range tester
Check which semantic versions satisfy a package version range.
Cron builder and explainer
Preview the next occurrences of a five-field cron expression.
JavaScript formatter and minifier
Format or minify JavaScript source without running the program.
HTML link extractor
Extract links and their labels from pasted HTML.
cURL and Fetch converter
Turn a supported cURL request into a readable Fetch snippet without sending it.
HTML table extractor
Extract a selected HTML table into rows and CSV.
HTML to plain text
Extract readable text from HTML while retaining useful line breaks.