0

I know that python has the built in re module, but even reading the API documentation has not done me much good. You can use the re.search function to find any instance where there is a single digit but I want it to search not for a digit but for any whole number. So my script might look something like this.

c = "I need to locate 194.5.19 and also 10.72.100 and lastly 1.999.8"
match = re.search('some type of identifier', h)
if match:
    print match.group()
else:
    print 'did not find'
Wiktor Stribiżew
  • 484,719
  • 26
  • 302
  • 397

0 Answers0