import re
a = 'This is a testing text and used to test and test and test.'
print([m.start() for m in re.finditer('\\btest\\b', a)])
How to use regex to find a specific word from text and return all occurences?