Regex Tester

Test and debug regular expressions with real-time matching and explanations
Buy me a coffee
Ad (Dev Mode)
Ad Placeholder
Slot: regex-top-728x40

Regex Pattern

Flags:

Quick Examples:

Test String

425 chars
Loading...

Test Results

2 matches found
Statistics
Pattern/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g
Total Matches2
Execution Time0.24ms
Flagsg
Matches (2)
Match 1
Index: 28
john.doe@example.com
Match 2
Index: 50
support@company.org

About Regex Tester

Build and test regular expressions with live preview. See matches highlighted in real-time and understand complex regex patterns with detailed explanations.

Key Features (5)

  • Real-time regex testing
  • Match highlighting
  • Capture groups display
  • Flag support (g, i, m, s)
  • Common regex examples

Common Use Cases (5)

  • Data validation patterns
  • Text processing and parsing
  • Form input validation
  • Log file analysis
  • String manipulation tasks

Frequently Asked Questions (3)

Q: What are regex flags?

A: Flags modify how regex patterns work: g (global) finds all matches, i (ignore case) is case-insensitive, m (multiline) treats each line separately, s (dotall) makes . match newlines.

Q: How do I match email addresses?

A: Use a pattern like "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" for basic email validation.

Q: What are capture groups?

A: Capture groups use parentheses to extract specific parts of a match. For example, "(\d{4})-(\d{2})-(\d{2})" captures year, month, and day separately.

Related Topics

regexregexppattern-matchingvalidationtext-processingjavascript