0

my input string This is Bruno. He is a service shark. Only gets out of the 12.5/11 water to assist you. 13.5/10 terrifyingly good boy

In the string above, I want to extract 13.5 instead of 12.5 so I did this: Here is the code

    a = re.search(r"\d*\.\d+|\d+\/\'10'", text)
    print(a.group())
# 12.5

How should I do it?

Umair Mubeen
  • 796
  • 2
  • 18
Essien
  • 1
  • 1

0 Answers0