Regex Tester

Test regular expressions with real-time match highlighting, capture groups, and common pattern templates.

Advertisement
/ /
Matches will be highlighted here...
Advertisement

About Regular Expressions

Regular expressions (regex) are patterns used to match character combinations in text. They are an essential tool for text processing, validation, search and replace operations, and data extraction.

Flags Reference

  • g (Global) — Find all matches rather than stopping after the first match
  • i (Case Insensitive) — Match letters regardless of case
  • m (Multiline)^ and $ match start/end of each line, not just the whole string
  • s (Dotall). matches newline characters as well

Quick Reference

  • . — Any character (except newline without s flag)
  • \d — Digit [0-9]
  • \w — Word character [a-zA-Z0-9_]
  • \s — Whitespace character
  • *, +, ? — Quantifiers (0+, 1+, 0 or 1)
  • ( ) — Capturing group
  • [ ] — Character class
  • ^, $ — Start/end anchors

This regex tester runs entirely in your browser using JavaScript's built-in RegExp engine. No data is sent to any server.