# Search string function

**URL:** <https://forum.kirupa.com/t/search-string-function/289937>\
**Category:** Uncategorized\
**Created:** [June 7, 2009, 6:34pm UTC](https://forum.kirupa.com/t/search-string-function/289937 "2009-06-07T18:34:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobcahill](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bobcahill](https://forum.kirupa.com/u/bobcahill)\
**Post date:** [June 7, 2009, 6:34pm UTC](https://forum.kirupa.com/t/search-string-function/289937/1 "2009-06-07T18:34:54Z")

</div>

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 = testString.search(".")  
trace(getBack);
