raatools/

Regex Tester

Test regular expressions with real-time matching and capture group extraction.

How to use the Regex Tester

Enter a regular expression pattern, select flags (g, i, m, s), and paste text to test. The tool highlights all matches and displays capture groups in real time.

Common regex patterns

  • ^[^\s@]+@[^\s@]+\.[^\s@]+$ — Email address
  • https?://\S+ — URLs starting with http or https
  • \b\d3\.\d3\.\d3\.\d3\b — IPv4 addresses
  • \d4-\d2-\d2 — Dates in YYYY-MM-DD format
  • [A-Z][a-z]+ — Capitalized words

Regex flags explained

  • g — Global: find all matches, not just the first.
  • i — Ignore case: make matching case-insensitive.
  • m — Multiline: ^ and $ match line boundaries, not just string boundaries.
  • s — Dotall: . matches newlines as well.

Capture groups

Use parentheses () to create capture groups. Each group is numbered from 1. For example, (\w+)@(\w+) captures the local and domain parts of an email.