i am trying to find text index using javascript/jquery, but i am not get the exact solution for it.
Consider the text is like this ...
Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.Hi all. hello world. Hi all. Hello world.
How can i get the exact position of selected 'Hello' word on any line? I tried indexOf, but it is giving me first hello text index. Please any one suggest solution for this.
Thanks in advance.