No one has replied
Feels a bit "cheaty", to be honest. I see the purpose of this task to implement the checking function yourself, not to ask interpreter to try and do that for you. This would be superior version for production, though.
BTW, your code can be made shorter:
This would be accepted as well.
Instead of comparing length of matched strings you could require your regex to only match all string or don't match at all.
Here ^ stands for begin of string, and $ for its end.
I got also confused by the fact that 43.e3 should have passed. In scientific notation fraction is usually normalized to be between 1 and 10.
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.