3. is a valid number? And regex


  • 0
    Y

    Am I the only one thinking about regular express at the first glance?
    "\s*[-+]?\d*\.?\d+\s*"

    Then Why the 3. is a valid number?


  • 0
    C

    I have the same confusion with you. But we have to revise our code according to the runtime errors.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.