Search string function

I need to be able to get the int returned on this. If I serach for any letter as a string I get the search function working right. If I run it like it is below I get back 0, which I should get 3. Any ideas

var testString:String = “the.rieh”;
var getBack:int =".")