National Day Day 2: fixed a bug in my #ALPHA contest analysis script for the whole morning. There was one bug—my [regular expressions] made me want to vomit. Back then, I was a true master of regular expression writing 🥶🥶
This bug happened because I recently ran into a contest coin called $O . In the screenshot OCR recognition interface, the letter “O” and the number “0” look so similar that you can’t tell who’s who—who’s correct and who isn’t—and then it crashed 🤨🤨
And since it’s a single-letter coin, when the OCR results ignore spaces, it becomes even more annoying.
Regular expressions can’t solve it, and it’s not suitable for this kind of edge case, so I added a feature: when an anomaly is detected, it pops up for manual input. One-and-done, forever.
Seriously—this is a proper coin name; who would come up with such a tricky one? Next time don’t send me a coin called $L or $1… otherwise…
This bug happened because I recently ran into a contest coin called $O . In the screenshot OCR recognition interface, the letter “O” and the number “0” look so similar that you can’t tell who’s who—who’s correct and who isn’t—and then it crashed 🤨🤨
And since it’s a single-letter coin, when the OCR results ignore spaces, it becomes even more annoying.
Regular expressions can’t solve it, and it’s not suitable for this kind of edge case, so I added a feature: when an anomaly is detected, it pops up for manual input. One-and-done, forever.
Seriously—this is a proper coin name; who would come up with such a tricky one? Next time don’t send me a coin called $L or $1… otherwise…

