How to write a Python regular expression to get numbers except decimal?

PythonServer Side ProgrammingProgramming

The following code gets the numbers in the given string except the decimal

>>> m = re.match(r"(\d+)\.(\d+)", "80.3196")
>>> m.groups()
('80', '3196')
raja
Published on 10-Jan-2018 14:47:23
Advertisements