Skip to main content

Regex Roulette · #7 · 2026-04-11

Match valid-looking IPv4 addresses (4 dot-separated number groups)

Difficulty 2/3

How to play

Write a regex that matches all green strings and rejects all red strings. Live feedback shows which strings pass. Shorter patterns score better.

Must match

  • 192.168.1.1 — not yet evaluated
  • 10.0.0.1 — not yet evaluated
  • 255.255.255.0 — not yet evaluated
  • 0.0.0.0 — not yet evaluated

Must not match

  • 1.2.3 — not yet evaluated
  • 1.2.3.4.5 — not yet evaluated
  • abc.def.ghi.jkl — not yet evaluated
  • 1234.1.1.1 — not yet evaluated

Loading your progress...

Pattern body only — slashes and flags (e.g. /g, /i) aren't part of the input.

0/200 chars

Type a regex that matches all green strings and rejects all red strings · Back to hub