Toolivaro

Regex-Tester kostenlos

Teste reguläre Ausdrücke live gegen deinen eigenen Text — mit Treffer-Hervorhebung, Capture-Gruppen und Flags, komplett lokal.

Der Regex-Tester validiert ein Muster und zeigt jeden Treffer in deinem eigenen Text, während du tippst — ohne Server-Roundtrip. Füge beliebigen Text ein oder tippe ihn, gib ein Muster ein, schalte die Standard-Flags um (global, case-insensitive, multiline, dot-all, unicode, sticky), und das Tool listet jeden Treffer mit Position, passendem Text und den erzeugten Capture-Gruppen. Muster werden mit der ECMAScript-RegExp-Engine der Plattform kompiliert — das Verhalten, das du hier testest, ist exakt das Verhalten, das du in JavaScript, Node.js und jedem modernen Browser bekommst. Das Tool verspricht Engine-Treue, keinen nachgeahmten Dialekt. Fehlerhafte Muster liefern die Fehlermeldung der Plattform, damit du sie schnell beheben kannst, und eine Sicherheitsgrenze beim Durchsuchen der Treffer verhindert, dass pathologische Muster die Seite einfrieren. Alles läuft lokal in deinem Browser: der Text, den du einfügst — Log-Auszüge, Konfiguration, personenbezogene Daten — wird nie hochgeladen, protokolliert oder gespeichert. Nutze dieses Tool beim Schreiben eines Validators, beim Debuggen eines Log-Parsers oder bevor du dich in Produktionscode auf ein Muster verlässt.

Wird lokal in deinem Browser verarbeitet

Flags

So verwenden Sie diesen Rechner

Building a pattern the way the engine sees it

A regular expression is a miniature program: the engine walks your text, and at every position it asks whether the pattern matches starting there. The tester makes that walk visible — every match is listed with its position, the exact text it matched, and the capture groups it produced, updated as you type. Start with the literal that must appear (request_id=, say), add the flexible parts around it (a w+ for the value), and check the result against real lines from your data before you trust it anywhere.

The engine here is the platform’s ECMAScript RegExp — the same one JavaScript, Node.js, Deno, and every modern browser use. That is the point of the tool’s fidelity promise: a pattern that matches here matches in your code, and one that fails here will fail there. Dialects like PCRE (PHP, grep, regex101’s default) have features ECMAScript lacks or spells differently — lookbehind syntax, named-group conventions, atomic groups — and the tester rejects them with the platform’s error message rather than pretending to support a dialect it does not run.

Using the flags deliberately

Flags are not decorations — they change what the pattern means. Without g, the engine stops at the first match, and the classic "why does my pattern match once?" confusion is usually a missing g. Without m, the anchors ^ and $ bind to the whole string, not to line boundaries, so a pattern that should match each log line silently matches nothing when the text has multiple lines. The s flag is the one that surprises everyone: . matches every character except line breaks unless s is set, so patterns that should span lines fail on the newline. And the difference between the unicode u and non-unicode modes changes how astral characters like emoji are treated — a point where the ECMAScript engine is stricter than older dialects.

The tester shows the flags you have set at a glance and re-runs the scan on every change, so each flag’s effect is visible the moment you toggle it. That is the fastest way to learn what a flag does: switch it, watch the match list change.

Reading matches, groups, and failures

Each result row shows the matched text, its start position, and its capture groups — the parts of the pattern inside parentheses, which are the values your code will actually consume. The classic use is extraction: with /request_id=(w+)/g against a log line, group 1 holds the id, and the tester shows both matches and their group values before you wire the pattern into a pipeline.

A pattern that matches nothing is a bug report, not a puzzle: the tool shows every match position so the failure is visible at a glance — the pattern matched a different place than you expected, or matched zero times because of a missing flag, a literal space, or an anchor bound to the wrong position. Malformed patterns return the platform’s own error message, which names the position of the problem, so fixing is a matter of reading the message rather than guessing.

Safety and the honest limits

Regular expressions can be pathological: certain patterns take exponential time on certain inputs — the classic "catastrophic backtracking" failure mode — and the tester caps match scanning so a hostile pattern cannot freeze the page. The cap is disclosed; extremely large texts or pathological patterns are truncated with a notice rather than run to completion.

Two things the tool deliberately does not do: it does not judge whether a pattern is efficient enough for production traffic (that is a load-testing question), and it does not claim your pattern is correct in the abstract — it shows what the engine does with your text, which is the only honest answer. And because patterns and pasted text often contain credentials and personal data, everything runs locally: nothing is uploaded, logged, or stored.

Wie wird das Ergebnis berechnet?

IDs aus Log-Zeilen extrahieren

Bei Log-Zeilen wie „2026-08-05 09:30 ERROR request_id=7f3a user=ada" matcht das Muster /request_id=(\w+)/g jede Request-ID und fängt den Wert in Gruppe 1. Der Tester listet beide Treffer mit Positionen und ihren Capture-Gruppen, damit du das Muster bestätigen kannst, bevor du es in einer Log-Pipeline einsetzt.

Beispieleingabe und -ausgabe
Eingabe Wert
text 2026-08-05 09:30 ERROR request_id=7f3a user=ada 2026-08-05 09:31 ERROR request_id=9c21 user=bob
pattern request_id=(\w+)
flags g
Ergebnis 2 Treffer · Gruppe 1: 7f3a, 9c21

Wie lautet die Formel und ihre Annahmen?

Matching-Semantik

matches = text.scan(pattern, flags)

Formelbegriffe
Symbol Bedeutung
pattern ECMAScript-Regulärer-Ausdruck (RegExp-Engine der Plattform)
flags g (global), i (Groß-/Kleinschreibung ignorieren), m (multiline), s (dot-all), u (unicode), y (sticky)

Das Verhalten ist exakt das der Plattform-Engine — was hier matcht, matcht in JavaScript, Node.js und Browsern.

Welche Fehler sind am häufigsten?

  • Mit dem g-Flag zu testen, aber nur das erste Ergebnis zu lesen — mit /g läuft die Engine durch jeden Treffer.
  • PCRE-Features (wie Lookbehind vor ES2018) in einem ECMAScript-Muster zu erwarten.
  • Zu vergessen, dass . Zeilenumbrüche nicht matcht, außer das s-Flag ist gesetzt.
  • Muster oder Texte mit Geheimnissen in einen Webdienst einzufügen — dieses Tool ist vollständig lokal.

Welche Annahmen und Grenzen gelten?

  • Der Dialekt ist ausschließlich ECMAScript; PCRE-/RE2-Features, die nicht in ECMAScript existieren, werden mit der Fehlermeldung der Plattform abgelehnt.
  • Das Durchsuchen der Treffer ist aus Sicherheitsgründen begrenzt; extrem große Texte oder pathologische Muster können mit einem Hinweis abgeschnitten werden.
  • Das Tool zeigt, was die Engine matcht — es kann nicht beurteilen, ob ein Muster für eine Produktionslast effizient oder sicher ist.

Woher stammen die Zahlen?

Zuletzt geprüft 5. August 2026 · Version 1.0.0 · Toolivaro garantiert keine externen Inhalte.

Häufig gestellte Fragen

Welchen Regex-Dialekt nutzt dieses Tool?

Die ECMAScript-Engine der Plattform — denselben Dialekt, den JavaScript, Node.js, Deno und Browser verwenden. Dialekte wie PCRE (PHP, grep, regex101-Standard) haben Zusatzfeatures wie Lookbehind in anderen Formen und Named Groups mit anderer Syntax; diese sind nicht Teil von ECMAScript.

Warum hat mein Muster nichts gematcht?

Häufige Ursachen: das fehlende g-Flag, wenn du mehrere Treffer erwartest, die vergessene Tatsache, dass Anker wie ^ und $ Zeilenanfänge nur mit dem m-Flag matchen, und Muster, die versehentlich wörtliche Leerzeichen enthalten. Das Tool zeigt jeden Treffer mit Position, sodass der Fehler meist auf einen Blick sichtbar ist.

Wird mein Text irgendwohin gesendet?

Nein. Muster und Text werden vollständig in deinem Browser-Tab verarbeitet — nichts wird hochgeladen, protokolliert oder gespeichert. Das ist bei Log-Auszügen und Konfigurationsdateien wichtig, die oft Anmeldedaten oder personenbezogene Daten enthalten.

What does the u (unicode) flag actually change?

It switches the engine to strict Unicode mode: astral characters (emoji, rare scripts) are treated as single code points instead of surrogate halves, and some otherwise-lenient syntax becomes an error. Patterns that work without u can behave differently with it — the tester makes the difference visible as you toggle.

Can I use the same pattern in Python or Go?

Not safely — those languages use different engines (Python’s re, Go’s RE2). The fidelity promise here is specifically ECMAScript: what matches here matches in JavaScript, Node.js, Deno, and browsers. Porting a pattern to another language means re-testing it in that language’s tester.

Teil von Text- und JSON-Werkzeuge für Entwickler

Fehler gefunden oder eine Korrektur? Melde ihn — jede Korrektur wird geprüft.

War dieses Werkzeug hilfreich?

Überprüft vom Toolivaro-Redaktionsteam gemäß unserer Methodik Methodik · Redaktionsrichtlinie