I have the following case:
Test (2.00001) Test (2.000) Test 2.1 Test (2,0001) Test 2,000 Test 2,1000 test 2
I try to use regex to find only the integers:
2.000
2,000
2
but not the other float numbers.
I tried different things:
re.search('(?<![0-9.])2(?![.,]?[1-9])(?=[.,]*[0]*)(?![1-9]),...)
but this returns true for:
2.00001
2.000
2,000
2,0001
2
What have I to do?
UPDATE
I have updated the question and it should also find an integer without any comma and point, too (2
).