Regex Tester Tool

Regex Tester Tool

Test and debug regular expressions with real-time matching

Regex Options

Enter Regex and Test Text

/
Characters: 0 Lines: 1

Quick Examples:

Quick Cheatsheet:

\d Any digit (0-9)
\w Word character
\s Whitespace
. Any character
[abc] Any of a, b, or c
[^abc] Not a, b, or c
a|b a or b
a* 0 or more of a
0
Pattern Length
0
Text Length

Testing regex pattern…

Success! Regex matches copied to clipboard.

Regex Test Results

Regex Matches Found
Total Matches: 0
Capture Groups: 0
Pattern Flags: None
Execution Time: 0ms
Pattern:

How Regex Testing Works

Regular expressions are patterns used to match character combinations in strings:

  • Literal characters match themselves
  • Metacharacters have special meaning (., *, +, ?, etc.)
  • Character classes match sets of characters ([a-z], \d, \w, etc.)
  • Quantifiers specify how many times to match (?, *, +, {n,m})
  • Anchors match positions (^ for start, $ for end)
// Example: Match email addresses
Pattern: /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/gi

Text: “Contact us at info@example.com or support@test.org”
Matches: “info@example.com”, “support@test.org”

Enter a regex pattern and test text to see matches here

Regex Test History

Your regex test history will appear here

About Regular Expressions

Regular expressions are patterns used for text search and manipulation.

  • Common Uses: Validation, search/replace, parsing, data extraction
  • JavaScript Support: Full regex support via RegExp object
  • Flags: i (case-insensitive), g (global), m (multiline), s (dotall), u (unicode), y (sticky)
  • Performance: Complex regex can be slow – test with realistic data
Security Note: Be cautious with user-provided regex patterns as they can cause ReDoS (Regex Denial of Service) attacks.
Scroll to Top