> For the complete documentation index, see [llms.txt](https://docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keyfax.biz/product-suite/admin/databox-expressions/text-expressions/indexof.md).

# IndexOf

This Expression returns a number indicating the position of the first character of a string being searched for within the databox value or 0 (zero) if no string match is found.

The syntax of the expression is as follows - parameters:

1\. string - a list of strings that should be searched for within the databox value\
2\. string - the list delimiter e.g. a comma (",") to indicate how to split the string in the first parameter\
3\. integer - 1 to indicate that the string comparison should ignore case, 0 to indicate that the string comparison should take case into consideration (i.e. when 1 "LiKeS" = "likes"

<table><thead><tr><th>Expression</th><th>Databox Value</th><th width="88">Result</th><th>Comments</th></tr></thead><tbody><tr><td><code>IndexOf("LiKeS,George", ",", 1)</code></td><td>George Smiley likes chess</td><td>14</td><td>As the case insensitive parameter is set to 1 the first string in the list of strings to search for 'LiKeS' is found at position 14.</td></tr><tr><td><code>IndexOf("LiKeS,George", ",", 0)</code></td><td>George Smiley likes chess</td><td>1</td><td>As the case insensitive parameter is set to 0 the change of case in 'LiKeS' does not match the 'likes' in the databox value, instead the second search string 'George' is matched and found at position 1.</td></tr><tr><td><code>IndexOf("NotThere", ",", 0)</code></td><td>George Smiley likes chess</td><td>0</td><td>As the string 'NotThere' cannot be found in the databox value the return value is 0.</td></tr></tbody></table>
