Promptyard
Regex

Regex Tester

JavaScript-flavour regex tester with live highlighting, capture groups, and flag toggles.

//g
Highlighted (3 matches)
Names spotted: Alice Smith, Bob Jones, and Carol Davis. Not a name: hello world, json text. Edge: É Hugo, McDowell.
Match details
  1. #1 @15 Alice Smithgroups: ["Alice", "Smith"]
  2. #2 @28 Bob Jonesgroups: ["Bob", "Jones"]
  3. #3 @43 Carol Davisgroups: ["Carol", "Davis"]

Flag cheatsheet

  • g — find all matches (otherwise just first)
  • i — case insensitive
  • m^/$ match line boundaries, not just doc boundaries
  • s. matches newlines
  • u — unicode mode (required for \p{...})

FAQ

JS flavour or PCRE?
JavaScript native RegExp. Most ECMA features supported (lookahead, lookbehind, named groups, unicode escapes). For PCRE-only features (recursion, backreferences-in-class) you'd need a wasm engine.
Why no replacement field?
Kept simple. For replacement, use String.replace in your code: str.replace(/pattern/g, replacement).
Are matches limited?
Capped at 5,000 matches to keep the page responsive. The per-page table shows up to 50; the count above is the true match count.
How do I match literal slashes?
Just type them. The pattern field has no surrounding delimiters; the slashes you see in the UI (/.../{flags}) are display only.

Related tools