take a look in the manual for find()
something like find(varwithtext, "stringtolookfor")
if stringtolookfor does not occur in varwithtext, it should get you a -1
For every occurence, it will add 1 to the result.
I think this is the implementation of javascripts IndexOf
variable = "long text with some stuff"
find(variable, "stuff")
should give you 0
variable = "long stuffed text with some stuff"
find(variable, "stuff")
should give you 1