Python Regex mendapatkan indeks objek yang cocok

import re
 
s = "Welcome to Softhunt"
 
# here x is the match object
res = re.search(r"\bS", s)
 
print(res.start())
print(res.end())
print(res.span())
Outrageous Ostrich