FAILURE MAP
← Case archive

FA-96097 / Postal address normalization / Member archive

City-state-code last line parser: a last line without a city is accepted · case 02

"ZZ 11101" parses with an empty city.

Member previewVariant 2 · 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
missing city["", "ZZ", "22202"]nullFailed

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 ↗