I have tried writing a code for identifying decimal number in python using regular expression as indicated in the below code.
It is working fine for many case but still failing to identify below inputs
import re
string = input()
r = re.compile(r"([+\-.]?\d*\.\d+)\b")
if(r.match(string)):
print(True)
else:
print(False)
234.2344 ->for this input giving expected results
+.3456468 ->for this input giving expected results
5.34.0 -> for this input it should print False
4+345.0 -> for this input it should print False