FAILURE MAP
← Case archive

FA-96417 / Phone number formatting / Member archive

Variable-length area code grouping: mobile block code taken as three digits · case 02

Mobile numbers print as "07xx xxx xxx".

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Keep digits and drop one leading trunk 0; nine national digits must remain. Numbers starting 7 are mobile with a four-digit block code; otherwise the area code is the longest match from 2, 30, 31, 40, 4012 (no match -> None). The subscriber part is one group if at most 5 digits, two equal halves if even, else 3 then the rest. Return "0" + area + " " + groups joined by spaces.

Why this case matters

Area codes of different lengths share leading digits; choosing the wrong one regroups every digit and prints a number users cannot dial.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
mobile block"0722 202 345""07222 02345"Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗