FAILURE MAP
← Case archive

FA-96088 / Postal address normalization / Member archive

City-state-code last line parser: commas stay attached to city tokens · case 03

"FAKETOWN,ZZ 11101" is rejected and "HEIGHTS," keeps its comma.

Member previewVariant 3 · 3 implementations · 10 checks per implementation

Case contract

Uppercase, turn commas into spaces and split. If the last token is 5 digits or 5 digits, hyphen, 4 digits it is the code and is removed. The new last token must be a state in the toy table (ZZ, QX, XJ or the spelled names ZEDLAND, QUIXOTA, XANJOR mapping to them) and at least one city token must precede it. Return [city, state code, postal code or ""] or None.

Why this case matters

Last lines are parsed from the right because city names have any number of words; a mistaken boundary moves words between city, state and code.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
comma and space["ZORBLETON,", "ZZ", "33303"]["ZORBLETON", "ZZ", "33303"]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 ↗