Regex Tester
Test regular expressions with live match highlighting
Test regular expressions with live match highlighting
#1 [14-31] hello@snipkit.dev
$1 = "hello"
$2 = "snipkit.dev"
#2 [35-54] support@example.com
$1 = "support"
$2 = "example.com"Regular expressions describe text patterns compactly. This tester runs patterns through your browser's JavaScript engine, so the syntax is exactly what you'd write in a literal /pattern/flags or new RegExp()call — which also means it's slightly different from PCRE, Pythonre, and Go's RE2 flavors.
g — global: returns all matches instead of stopping at the first.i — case-insensitive.m — multiline: ^ and $ match the start and end of each line instead of the whole string.s — dotall: . matches newlines too.u — unicode: enables Unicode escapes like \p{Letter} and handles surrogate pairs correctly.Parentheses (…) create numbered capture groups. Use (?:…) for a non-capturing group when you just need grouping for alternation or repetition. Named groups (?<name>…) are easier to read in code and available on match.groups.
g, repeated calls to exec()on the same regex return the same first match — don't forget the flag for looping..+, .*) match as much as possible; add ? (.+?) to make them lazy.(a+)+ on large inputs.