0

I have the string:

a = '/imo:9615169/mmsi:373239000/vessel:ALAM%20MUTIARA'

Using regex,

result = re.search('imo:(.*)/', a)
print(result.group(1)) #prints 9284764/mmsi:354662000

Why does this print 9284764/mmsi:354662000 instead of just 9284764?

Rafael
  • 3,096
  • 1
  • 23
  • 61

0 Answers0