Get line number of the specific word or character

Hello, Is there any way to get the line number of the particular word

Hi, maybe this function will help you start. See below, where is working with regex to find words.
I hope you find what you’re looking for.