python regex get start end indices for searching word

PHOTO EMBED

Tue Apr 04 2023 04:07:27 GMT+0000 (Coordinated Universal Time)

Saved by @tofufu #python

# Using regex Python library

>>> match.start()
2
>>> match.end()
8
content_copyCOPY

https://www.programiz.com/python-programming/regex