Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
fullmatch solution in Clear category for Is String a Number? (Part II) by Phil15
import re
def is_number(val: str) -> bool:
return re.fullmatch(r'[-+]?(?:\d+\.?\d*|\d*\.\d+)', val) is not None
Nov. 27, 2022