Regex Tester Online - Test Regular Expressions

.*
DevDen Regex
Matches will be highlighted here

Regex Tester Online

Test and debug regular expressions in real-time with this free online regex tester. Features instant match highlighting, capture group display, and support for all JavaScript regex flags. All processing happens in your browser — your data never leaves your device.

Regular expressions (regex) are patterns used to match character combinations in strings. They're incredibly powerful for searching, validating, and manipulating text. Regex is supported in virtually every programming language and is essential for tasks like form validation, log parsing, data extraction, and search-and-replace operations.

  1. Enter your pattern — Type your regular expression in the pattern field (without the surrounding slashes)
  2. Add test text — Paste or type the text you want to test against
  3. View matches — Matches are highlighted in real-time as you type
  4. Check capture groups — If your pattern has groups, they'll appear below with index numbers
  5. Adjust flags — Toggle global (g), case-insensitive (i), multiline (m), and other flags as needed
  6. Use the pattern library — Click "Patterns" to browse 40+ common regex patterns for quick insertion
  • g Global — Match all occurrences, not just the first
  • i Case Insensitive — Match regardless of letter case
  • m Multiline — ^ and $ match start/end of each line, not just the string
  • s Dot All — Make . match newline characters too
  • u Unicode — Enable full Unicode support
  • y Sticky — Match only from the lastIndex position
  • ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ — Email address
  • ^https?:\/\/[^\s]+$ — URL
  • ^\d{4}-\d{2}-\d{2}$ — Date (YYYY-MM-DD)
  • ^(?=.*[A-Z])(?=.*[a-z])(?=.*\d).{8,}$ — Strong password
  • ^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$ — IPv4 address
  • \b\d{3}-\d{3}-\d{4}\b — US phone number
  • Start simple — Build your pattern incrementally, testing after each addition
  • Use anchors^ and $ ensure full string matching for validation
  • Escape special characters — Characters like . * + ? [ ] ( ) { } | \ ^ need backslash escaping
  • Be specific\d is better than . when matching digits
  • Use non-capturing groups(?:...) groups without creating a capture
  • Name your captures(?<name>...) makes patterns more readable
  • Avoid catastrophic backtracking — Nested quantifiers like (a+)+ can cause exponential time complexity
  • Test edge cases — Empty strings, special characters, and very long inputs
  • Real-time regex matching as you type
  • Visual match highlighting in test string
  • Capture group display with copy buttons
  • Named capture group support
  • All JavaScript regex flags (g, i, m, s, u, y)
  • Match count and position details
  • Keyboard shortcuts for power users
  • 100% client-side processing
  • No ads, no signup required
  • Mobile responsive design

Real-time matching · Capture groups · All JS flags · 100% private

Test and debug regular expressions online. Fast, free, and built for developers.