Privvert - private browser-based file toolsPrivvert

Regex-Tester

Live-Treffer markieren

2 matches
  • "hello@privvert.com" at index 12
  • "test@example.org" at index 34

Über dieses Tool

Test JavaScript regular expressions against sample text with live highlighting and a list of every match and capture group. The right tool for building a tricky regex, debugging one that isn't working, or learning regex by experimenting.

Privvert uses the browser's own regex engine (the same one that runs your JavaScript), so the matching behavior is exactly what you'll get in production code. Includes flag toggles, replace mode, and a friendly error display.

The tester runs your pattern against the input string using the browser's native JavaScript regex engine - the same one your code will use at runtime - so results match exactly what users will experience. Capture groups, named groups, lookbehind, Unicode property escapes and all modern flags (g, i, m, s, u, y) are supported.

Funktionen

  • Live match highlighting in the sample text
  • List of all matches with capture groups
  • Flag toggles: g (global), i (case-insensitive), m (multiline), s (dotall), u (unicode), y (sticky)
  • Replace mode with capture-group references
  • Real-time error messages for invalid patterns
  • Browser-only - content never uploaded
  • Free and unlimited

So funktioniert's

  1. Type or paste a regex pattern.
  2. Toggle flags as needed.
  3. Paste sample text.
  4. Inspect highlighted matches and capture groups.
  5. (Optional) switch to replace mode and see the result.
🔒 100 % privat

Alles passiert direkt in deinem Browser mit JavaScript und WebAssembly. Deine Dateien werden nie hochgeladen, nie gespeichert und nie von uns gesehen.

Häufig gestellte Fragen

Which regex flavor?

ECMAScript / JavaScript regex - the engine your browser uses to run JS. Slightly different from PCRE (used in Perl, PHP, Python) - most patterns work the same but a few advanced features differ.

Why isn't my pattern matching?

Common gotchas: forgetting the g flag for multiple matches, using ^ and $ without the m flag for line anchors, using . without the s flag (which doesn't match newlines by default).

Can I use named capture groups?

Yes - (?...) syntax works. Named groups appear by name in the match list.

Does it handle Unicode?

Yes - enable the u flag for full Unicode mode (\p{Letter} etc.). Without it, character classes work on ASCII only.

Why do my regex results differ between languages?

Regex flavors differ. PCRE (PHP, Perl), Python's re, .NET, Go's RE2 and JavaScript all have subtle differences in features like lookbehind, possessive quantifiers and named groups. Test in the engine your production code uses.

Is regex the right tool for parsing HTML or JSON?

No - they are nested, context-sensitive formats that regex cannot reliably parse. Use a real HTML parser (DOMParser, cheerio) or JSON.parse. Regex is for tokenizing flat text: emails, log lines, simple patterns.