RegexWars
Tier 4 · Enchantercapture

Read The Log

Pull the timestamp, the level and the message out of a bracketed log line.

Group 1 is the timestamp without its brackets, group 2 the level, group 3 everything else. The obvious pattern uses .+ for the timestamp — check what that does to a message that contains a bracket of its own.

Your pattern0 chars · par 23
//
Flags
Start typing — tests run as you go.0 of 4 visible tests passing
Test cases
  • [2026-08-11T12:04:33Z] ERROR Disk full on /dev/sda1→ ["2026-08-11T12:04:33Z", "ERROR", "Disk full on /dev/sda1"]
  • [2026-08-11T12:04:34Z] INFO Retrying in 5s→ ["2026-08-11T12:04:34Z", "INFO", "Retrying in 5s"]
  • [2026-08-11T09:00:00Z] WARN Cache miss rate 91%→ ["2026-08-11T09:00:00Z", "WARN", "Cache miss rate 91%"]
  • connection closedmust not match

    no timestamp, no level

+ 4 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.