Looking for plugin that checks index position of a searchstring in a list of things

I have a field that is a list of texts.
I want to have the index position of a searchstring in that list. So on what position is that searchtext inside the list of things. I need it in a backend workflow.
How can I do this? Or is it solvable with an api call/javascript?