ToolCabana
Language preview: no interface translation is available for this language yet. Showing English. Use English

Regex tester

Test matches and replacements with a bounded regex worker.

Favorites are saved in this browser. Find them in My favorites.

Regex tester

Your input stays in this browser unless stated otherwise
Clear your input, files and result, and restore the default settings.
Load sample text to explore what this tool can do. This replaces your current input.
0 charactersClear the source text.

How to use Regex tester

Regex tester runs a JavaScript regular expression against your text and lists every match with its index and numbered or named capture groups. Matches are highlighted in the source, and an optional replacement string shows the replaced text. Patterns run in a separate worker with a time limit, and up to 1,000 matches are listed.

  1. Paste the source into the input editor, or load the built-in example.
  2. Adjust the basic settings, then open Advanced mode for export and fine-tuning options. Custom settings stay active when the panel is closed.
  3. Run regex tester, review the output, then use the available copy or download controls.

What this tool supports

Test matches and replacements with a bounded regex worker.

Regular expression
Set this value for your task.
Flags
Set this value for your task.
Replacement (optional)
Set this value for your task.

Limits and processing

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

Example source
Hello ToolCabana

Frequently asked questions

Which regex flavor does the regex tester use?

It uses JavaScript regular expressions. Allowed flags are d, g, i, m, s, u, v and y, each used at most once. The search always scans for every match, as with the g flag.

How do I test a regex replacement?

Enter a value in Replacement (optional). The output then shows the text after replacement, and you can use $1 or a named group reference to insert captured text.

Why does my regex say it exceeded the execution limit?

Each pattern runs in a worker that stops after a short time limit, which catches catastrophic backtracking. Simplify nested quantifiers or alternations. Text over 500,000 characters or patterns over 2,000 characters are also rejected.

Where is my input processed?

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

What are the input limits?

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.