FA-96759 / Phone number formatting / Member archive
Pattern-driven phone input mask: escaped X consumes a digit · case 04
"E\XT XXXX" shows a backslash and uses the first digit as the X.
Case contract
Input [digits, pattern]. Each X consumes the next digit; "\" makes the next pattern character a literal; other characters are literals. Literals are buffered and written only in front of the next digit, so a partial input never ends in a literal; when the whole pattern was consumed the trailing literals are written too. More digits than X slots returns None.
Why this case matters
Input masks drive what users see while typing; stray punctuation, lost literals or silently dropped digits produce numbers that differ from what was typed.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| escaped letter X | "E\\8T 550" | "EXT 8550" | 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 ↗