Skip to main content
ZebbyBox
Buy Me A Coffee

Regex Tester

Test and debug regular expressions with real-time matching and syntax highlighting.

//
Enter text above to see highlighted matches

What are Regular Expressions?

Regular expressions (regex) are patterns used to match character combinations in strings. They're powerful tools for text searching, validation, and manipulation used in virtually every programming language.

Regex Flags Explained

  • g (Global): Find all matches rather than stopping after the first
  • i (Case Insensitive): Makes the pattern case-insensitive
  • m (Multiline): ^ and $ match start/end of each line
  • s (Dot All): Allows . to match newline characters
  • u (Unicode): Enables full Unicode support

Common Regex Patterns

\dAny digit (0-9)
\wWord character
\sWhitespace
.Any character
*0 or more
+1 or more
?0 or 1
^Start of string
$End of string
[abc]Character set

Tips for Writing Regex

  • Start simple and build complexity gradually
  • Use non-capturing groups (?:...) when you don't need the match
  • Use *? or +? for lazy matching
  • Escape special characters with backslash
  • Test with edge cases and unexpected input

100% Private

All regex testing happens locally in your browser using JavaScript's built-in RegExp engine. Your patterns and test strings never leave your device.