in reply to extract whole sentence after a match of a word

It's hard to guess what you are up to, but usually that kind of problem can be solved by first spliting the text into records (here: sentences), and then searching in each of the records for the word you are looking for.

also is it possible, in the result the word searched to be displayed in bold

That depends on how the result is displayed. If the output goes into a terminal, you can use Term::ANSIColor for the formatting, other choices of output require other things to do.

As you can see your questions are rather vague, so the answers must be as well.

  • Comment on Re: extract whole sentence after a match of a word