Skip to main content

Regex Tester

Test regular expressions with real-time highlighting, capture groups, and detailed match statistics

Need to validate your regex matches? DataKit offers professional data validation tools for developers.

Testing with:🟨 JavaScript

Enter a regex pattern and test string to get started, or load a sample pattern.

Keyboard Shortcuts

Ctrl+KClear AllCtrl+EnterTestCtrl+HHistory
⌨️ Keyboard Shortcuts
Clear AllCtrl+K
Test PatternCtrl+Enter
Copy PatternCtrl+Shift+C
Toggle HistoryCtrl+H

On Mac, use ⌘ (Cmd) instead of Ctrl

How to Use

Getting Started

  • Enter your regular expression pattern in the pattern field
  • Enter or paste the text you want to test against
  • Select flags like global (g), multiline (m), or case-insensitive (i)
  • View real-time highlighting of matches and detailed statistics

Regex Flags

  • gGlobal - Find all matches rather than stopping after first match
  • mMultiline - ^ and $ match start/end of line
  • iCase insensitive - Match regardless of case
  • uUnicode - Enable full Unicode support
  • sDot all - Dot matches newline characters

Common Patterns

Email Address

^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

URL

https?://[^\s]+

Phone Number

\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})

Date (YYYY-MM-DD)

\d{4}-\d{2}-\d{2}

Related Tools