Back to Coding Tools

Regex Tester

Test and debug regular expressions with real-time matching

Regex Pattern
//
Test String341 chars
Matches1 match
Hello World! My email is john@example.com and my website is https://smarttoolbox.dev.

You can call me at (555) 123-4567 or +91-98765-43210.

Server IPs: 192.168.1.1, 10.0.0.1
Release date: 2025-03-25
Colors: #5046e5, #ff6b35, #2ecc71

<div class="container">
<h1>Welcome</h1>
<p>This is a sample paragraph with the number 42.</p>
</div>
Match Details
#MatchIndex
1john@example.com25

What is Regex Tester?

Regex Tester is a free online tool for testing and debugging regular expressions. Enter a regex pattern and test string to see all matches highlighted in real time, including capture groups and match positions. Perfect for building and validating regex patterns before using them in your code.

How to Use

  1. Enter a pattern — Type your regex in the pattern field between the slashes.
  2. Set flags — Toggle global (g), case-insensitive (i), multiline (m), or dotall (s).
  3. Enter test text — Paste or type the text you want to test against.
  4. View matches — Matches are highlighted in real time with a detailed table below.

Common Use Cases

✅ Validate Input

Test email, phone, URL, and date patterns before adding to your forms.

🔍 Search & Extract

Find and extract specific data patterns from logs, text files, or documents.

🛠️ Debug Patterns

Visualize exactly what your regex matches to catch edge cases and errors.

📚 Learn Regex

Experiment with common patterns and see instant results to learn regex syntax.