Regex Tester
Test regular expressions in real-time with instant matching, group highlighting, and a handy cheat sheet.
Regex Cheat Sheet
.Any character except newline
\dDigit (0-9)
\wWord character (a-z, A-Z, 0-9, _)
\sWhitespace (space, tab, newline)
^Start of string
$End of string
*0 or more
+1 or more
?0 or 1 (optional)
{n,m}Between n and m times
(abc)Capture group
(?:abc)Non-capturing group
[abc]Character class
[^abc]Negated class
a|bAlternation (a or b)
(?=abc)Positive lookahead
Frequently Asked Questions
What regex flavor does this tool use?
BytePane uses JavaScript's built-in RegExp engine. This is the same regex flavor used in Node.js, browsers, TypeScript, and Deno. Most patterns are compatible with PCRE (PHP, Python) with minor differences.
What are regex flags?
Flags modify regex behavior. "g" (global) finds all matches. "i" (case-insensitive) ignores case. "m" (multiline) makes ^ and $ match line starts/ends. "s" (dotAll) makes . match newlines. "u" (unicode) enables Unicode mode.
How do capture groups work?
Parentheses (abc) create a capture group that remembers the matched text. You can reference groups by number ($1, $2) in replacements. Use (?:abc) for non-capturing groups when you need grouping without capturing.