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
Updated on 19-Feb-2020 12:50:29

Advertisements