Analysis 100% in your browser

Regex Tester

Test regular expressions live against any text. Matches are highlighted instantly. Supports all standard JavaScript regex flags.

Regex Tester

Write a regular expression pattern, set optional flags, and type your test string — matches are highlighted in real time. Any syntax errors in the pattern are reported immediately.

Anatomy of a regular expressionThe pattern finds every whole word of exactly 5 letters.Anatomy of a regular expression\bwordboundary\wa letter,digit or _{5}exactly 5times\bwordboundaryTested textThe quick brown fox jumps over the lazy dogMatches: the 5-letter wordsgall matchesiignore casemmulti-line
The pattern finds every whole word of exactly 5 letters.

Diagram of a regular expression for dates split into three capture groups: year, month and day of 2026-11-07

Each pair of parentheses creates a capture group that you can read separately in the results.

Supported flags

  • g — global: find all matches, not just the first
  • i — case-insensitive: match regardless of letter case
  • m — multiline: ^ and $ match start/end of each line
  • s — dotAll: . matches newline characters too
  • u — unicode: enables full Unicode matching
  • y — sticky: match only from lastIndex

Quick regex reference

  • . — any character except newline
  • \d — digit [0–9]
  • \w — word character [a–z A–Z 0–9 _]
  • \s — whitespace
  • ^ / $ — start / end of string (or line with m)
  • * + ? — zero-or-more, one-or-more, optional
  • {n,m} — between n and m repetitions
  • (a|b) — alternation: a or b
  • [abc] — character class
  • (?=…) — positive lookahead