K
ken
HomeArticles🕐 Time Converter📋 JSON Tools🖼️ Base64 Image🔑 Password Generator Cron Expression🔤 Case Converter📱 QR Code#️⃣ Hash🔡 Encoding🔍 Regex Tester⚙️ Config Convert🔐 Encrypt/Decrypt

Regex Tester

Online regex tester with real-time match highlighting

//gm

📖 Regex Tester Guide

Introduction

The Regex Tester is an online regular expression debugger. Enter a pattern and test text, see matches highlighted in real-time. Supports all flags (g/i/m/s/u/y), capture groups, and match positions.

Features

  • Real-time highlighting: See matches instantly
  • Capture groups: View $1, $2 group contents
  • Match positions: See where each match occurs
  • Error feedback: Detailed syntax error messages
  • Full flags: g, i, m, s, u, y

How to Use

  1. Enter a regex pattern (without delimiters)
  2. Select flags
  3. Enter test text
  4. Matches highlight automatically

Example

Pattern: \d{3,4}[ -]?\d{7,8} → Phone numbers Pattern: [\w.-]+@[\w.-]+\.[\w]{2,} → Emails Pattern: https?://[^\s]+ → URLs

Use Cases

  • Form validation (email, phone, ID)
  • Log parsing and analysis
  • Data cleaning and transformation
  • Learning and debugging regex patterns