FA-96448 / Phone number formatting / Member archive
Extension and dial-pause parser: "ext" is tried before "extension" · case 03
"... extension 1" leaves "ension 1" as the extension and is rejected.
Case contract
Strip and lowercase. Try markers in order: "," (pause), ";" (wait), "extension", "ext.", "ext", "#", "x" (ext); the first marker found at an index > 0 splits the string into main and extension. The main part keeps its digits; the extension is stripped and, when a marker was found, must be 1..6 digits. Return {"main", "ext", "mode"} or None.
Why this case matters
Extensions and pause characters decide what a softphone dials after the call connects; a wrong split rings the wrong desk.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| dotted ext | null | {"ext": "13", "main": "5550137", "mode": "ext"} | 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 ↗