Regex Tester
Live JavaScript regex matcher. Capture groups highlighted. Useful for ACL pattern crafting, SIEM rule writing, log parsing.
Pattern
/
/
Test string
Matches
Cheat sheet
\ddigit ·
\D non-digit\wword char (a-z, A-Z, 0-9, _) ·
\W non-word\swhitespace ·
\S non-whitespace.any char (except newline)
^ $start / end (use
m flag for per-line)* + ?0+, 1+, 0 or 1 · add
? for lazy{n,m}between n and m repetitions
(...)capture group ·
(?:...) non-capture · (?P<name>...) named[abc]char class ·
[^abc] negated · [a-z] range(?=...)lookahead ·
(?!...) neg · (?<=...) lookbehindFlags
g global · i case-insensitive · m multiline · s dotall · u unicode