Write a function that finds all the occurrences of word in a text