Write a pattern, drop in sample text, and watch matches highlight instantly as you type. This tester uses the browser's native RegExp engine, so what you see here is exactly how the pattern behaves in JavaScript — no server round-trip, no surprises when you paste it into your code. Toggle flags, inspect capture groups per match, and lean on the built-in token reference when you forget whether it's \d or \D.
Type a regular expression into the Pattern field without the surrounding slashes — just the body, e.g. (\w+)@(\w+\.\w+).
Click g, i, m, s, u, or y to enable them. Global (g) is required to highlight every match instead of just the first.
Drop sample text into the Test String panel. Matches highlight live in the Preview panel as you edit the pattern or the text.
Each match lists its full text plus numbered and named capture groups below the preview, so you can confirm extraction logic before shipping it.
Confirm an email, phone, or slug pattern matches your valid examples and rejects the malformed ones before wiring it into a form validator.
Build a capture-group pattern against a real log sample and verify each field lands in the right group before writing a parser.
Paste the exact pattern and a failing input to see, character by character, why a match isn't happening the way you expect.
Use the quick reference panel alongside live highlighting to see immediately how each token changes what gets matched.
Yes. Matching runs entirely with the browser's native RegExp implementation — the same engine Node.js and every modern browser uses — so behavior here matches what you'll see at runtime.
Without the global (g) flag, JavaScript's RegExp only reports the first match. Enable g to see every occurrence highlighted and listed.
Sticky anchors matching to lastIndex — the exact position in the string — rather than scanning forward to find the next match. It's mostly useful for building tokenizers; for general testing, g is usually what you want.
If your pattern uses (?<name>...) groups, each match lists them alongside numbered groups, labeled with the name you chose so you can verify the mapping your code will rely on.
The pattern failed to compile as a valid JavaScript RegExp — usually an unbalanced bracket, an invalid escape, or an unsupported flag combination (like u and unpaired surrogate ranges). The error message is passed through directly from the engine.
Contact us at support@example.com or sales@example.co.uk for help. This line has no email address to match. Malformed: not-an-email, another@bad
.Any character except newline\dDigit (0-9)\DNon-digit\wWord character (a-z, A-Z, 0-9, _)\WNon-word character\sWhitespace\SNon-whitespace+One or more of the preceding token*Zero or more of the preceding token?Zero or one — makes preceding token optional{n,m}Between n and m repetitions[abc]Character class — any of a, b, or c[^abc]Negated class — anything but a, b, or c(...)Capture group(?:...)Non-capturing group(?<name>...)Named capture groupa|bAlternation — a or b^Start of string (or line, with m)$End of string (or line, with m)\bWord boundary