— : The "find" expression would only return the index of the first occurence of the string inside the text, wouldn't it?
codah : Thanks... I just looked over those solutions but I don't understand javascript enough to know what I'd be doing. Beside, I think that they only show methods to retrieve the number of times a string occurs in a text, and not the index of every occurence of that string. I might be wrong though, since as I said I don't understand enough of it to know what's really going on in the code.
Magistross : Thanks, your example works fine. I get that I need to insert the string I'm looking for between the two \w* brackets. But I start being lost the moment I look at the javascript. I'd like to implement in a way so it uses or stores the occurences' indexes it finds instead of showing them to me in an alert message, but I don't know how.