Regex Tester
Test and debug regular expressions with real-time matching.
//g
Flags:
Presets:
What are Regular Expressions?
Regular expressions (regex) are powerful patterns used to match, search, and replace text. They are supported in virtually every programming language — JavaScript, Python, Java, Go, Rust, C#, PHP, Ruby, and more. Regex is essential for input validation, log parsing, data extraction, and text transformation.
Common Regex Patterns
\\d— any digit (0-9)\\w— any word character (a-z, A-Z, 0-9, _)\\s— any whitespace (space, tab, newline)[abc]— character class: a, b, or ca|b— alternation: a or b^/$— start / end of string*/+/?— zero or more / one or more / optional\{n,m\}— between n and m repetitions(?:...)— non-capturing group(?<name>...)— named capturing group
Regex Flags Explained
g (global) — find all matches, not just the first. i (case-insensitive) — ignore case when matching. m (multiline) — ^ and $ match the start/end of each line. s (dotAll) — makes . match newlines too.
Features
- Real-time matching as you type
- Syntax highlighting for matched text
- Match details table with index and length
- Flag toggles (g, i, m, s)
- Preset patterns for common use cases
- 100% client-side — your data never leaves your browser