I've seen lots of solutions elsewhere (we have a Slack channel at work for it) that would accept lots of other invalid strings. endswith() or the equivalent was a common culprit, for example many would think the following were not invalid:-
hgt:172bcm
hgt:60zin
But Eric chose not put anything like that in.
My slicing wouldn't have caught that either. Will redo with regex at some point.
@atk started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
I've seen lots of solutions elsewhere (we have a Slack channel at work for it) that would accept lots of other invalid strings. endswith() or the equivalent was a common culprit, for example many would think the following were not invalid:-
hgt:172bcm
hgt:60zin
But Eric chose not put anything like that in.