Tier 4 · Enchanterreplace
Name Your Groups
Rewrite a log line "DATE TIME LEVEL MESSAGE" as "[LEVEL] MESSAGE (TIME on DATE)".
Four fields, all reordered. You can do this with $1 to $4, and you will miscount at least once. Name them instead: (?<level>\w+) creates a group called level, and $<level> puts it in the replacement. Same regex, same cost at runtime, and the replacement string now says what it means — which is the whole point, because a pattern is read far more often than it is written.
Your pattern0 chars · par 88
//
Flags
Start typing — tests run as you go.0 of 3 visible tests passing
Test cases
2026-08-13 14:22:31 ERROR database timeout→ "[ERROR] database timeout (14:22:31 on 2026-08-13)"2026-01-01 00:00:00 INFO started→ "[INFO] started (00:00:00 on 2026-01-01)"2025-12-31 23:59:59 WARN disk almost full→ "[WARN] disk almost full (23:59:59 on 2025-12-31)"
+ 3 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.