Skip to main contentSkip to calculator
108 calculatorsLive resultsStep-by-step solutions

Rechnerpilot tool

Regex tester

The RegExp is run in isolation in a Web Worker against the test text; matches and groups are displayed.

Developer Tools

Isolated execution is not available in this environment. The regex tester requires Web Worker support in the browser.

Explanation

How Regex tester works

The regex tester evaluates a regular expression (JavaScript/ECMAScript syntax) against a test text and displays matches, their position and captured groups. Using the flags you control, among other things, global search (g), case sensitivity (i) and multiline behavior (m).

Important for security: a pattern entered by the user can run for an arbitrarily long time due to "catastrophic backtracking". A pure input-length limit does not protect against this. That is why the evaluation runs in a separate Web Worker; if it does not respond within a short time, it is hard-terminated and discarded. The main thread — and thus the operation — always remains responsive.

Limits of this tool

  • Only JavaScript regex syntax — PCRE/.NET specifics are missing.
  • Blocking patterns are aborted, not "repaired".
  • A maximum of 1000 evaluated matches (the first 100 are listed).

Sources

  • ECMAScript Specification: RegExp syntax and semantics.
  • OWASP: Regular expression Denial of Service (ReDoS).

Practice

Practical examples

Roughly check an email

The pattern \S+@\S+\.\S+ finds simple email-like strings.

Extract digits

With flag g, \d+ returns all sequences of digits in the text.

Use groups

Parentheses capture sub-matches, which are displayed separately.

FAQ

Frequently asked questions

Why doesn't the page freeze?

The regular expression evaluation runs in a separate Web Worker. If a pattern blocks due to catastrophic backtracking, the user interface remains responsive; the worker is hard-aborted after a short time.

What is catastrophic backtracking?

Certain patterns (such as nested quantifiers like (a+)+) can require exponentially many steps with unfavorable inputs. This tool deterministically aborts such runs instead of blocking.

Is my data transmitted?

No. The pattern and test text are evaluated exclusively locally in the browser (in the worker). No transmission takes place.

Which syntax is supported?

The regular expression syntax of JavaScript (ECMAScript). Other dialects (PCRE, .NET) may differ.

Why aren't all matches shown?

To protect against extremely large outputs, a maximum of 1000 matches are evaluated; the first 100 are listed, and the first 50 in the PDF export. When the evaluation limit is reached, a note is shown.

Tips

Good to know

  • Enable flag g for all matches.
  • Avoid nested quantifiers like (a+)+ — they can block.
  • The evaluation runs in isolation; the page does not freeze.

Related calculators

More tools