Solve "Valid Number" using RE