TULKIT

Regex Tester - Test Regular Expressions Online Free

Test and debug regular expressions (regex) in real-time. Match patterns, extract groups, and validate your regex with instant feedback. Supports JavaScript regex syntax with global, case-insensitive, and multiline flags.

Why Use Regex Tester?

  • Live Testing: See matches highlighted in real-time
  • Capture Groups: View and extract matched groups
  • Multiple Flags: Test with g, i, m, s, u, y flags
  • Error Detection: Identify syntax errors instantly

Common Use Cases

✅ Validation

Validate email addresses, phone numbers, URLs.

🔍 Search & Replace

Find and replace patterns in text.

📊 Data Extraction

Extract specific data from logs and files.

🧹 Data Cleaning

Clean and normalize text data.

How to Use This Tool

  1. Enter Pattern: Type your regular expression pattern in the first field.
  2. Set Flags: Check the flags you need (global, case-insensitive, multiline).
  3. Test Text: Enter or paste your test text - matches are highlighted automatically.

💡 Tip: Use capturing groups () to extract specific parts of your matches.

Regular Expression Tester

/ /

Common Regex Patterns

Email

\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b

Matches email addresses

Phone Number

\(?(\d{3})\)?[-.\s]?(\d{3})[-.\s]?(\d{4})

Matches US phone numbers

URL

https?://[^\s]+

Matches HTTP/HTTPS URLs

IPv4 Address

\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b

Matches IP addresses

Date (MM/DD/YYYY)

\d{2}/\d{2}/\d{4}

Matches date format

Hex Color

#[0-9A-Fa-f]{6}

Matches hex color codes

Regex Syntax Quick Reference

  • . - Any character except newline
  • ^ - Start of string
  • $ - End of string
  • * - 0 or more occurrences
  • + - 1 or more occurrences
  • ? - 0 or 1 occurrence
  • {n} - Exactly n occurrences
  • {n,m} - Between n and m occurrences
  • [abc] - Any character a, b, or c
  • [^abc] - Not a, b, or c
  • [a-z] - Any lowercase letter
  • \d - Any digit [0-9]
  • \w - Any word character [A-Za-z0-9_]
  • \s - Any whitespace
  • \b - Word boundary
  • () - Capture group

Regex Flags Explained

  • g - Global: Find all matches, not just the first
  • i - Case insensitive: Match both upper and lowercase
  • m - Multiline: ^ and $ match line breaks
  • s - Dot all: . matches newlines too
  • u - Unicode: Treat pattern as Unicode code points
  • y - Sticky: Match from lastIndex position

Related Tools