# Searching a text string seperated by commas

**URL:** <https://forum.kirupa.com/t/searching-a-text-string-seperated-by-commas/241904>\
**Category:** Uncategorized\
**Created:** [October 19, 2007, 9:21am UTC](https://forum.kirupa.com/t/searching-a-text-string-seperated-by-commas/241904 "2007-10-19T09:21:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![burian](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@burian](https://forum.kirupa.com/u/burian)\
**Post date:** [October 19, 2007, 9:21am UTC](https://forum.kirupa.com/t/searching-a-text-string-seperated-by-commas/241904/1 "2007-10-19T09:21:51Z")

</div>

I’m trying to find if a text field with text seperated by commas contains certain text.

if (myText.text == “three”) {  
trace(“true”); //if myTxt.text is “three”  
} else {  
trace(“false”); //if myTxt.text is “one, two, three”  
}

Is there a way to find in the above example, if “three” is contained within the text field?

Thanks in advance.
