I have a huge text document lets say of 1000's of words and with way too many lines in the text.
I want to grab specific value of a particular word. In my example word is Teetotlar
and value is Yes
or No
Sample text:
I am going to a party with my friends. I have lot of friends. they are all coming to party. I will be happy to see each of them.
Many of my friends drink but if you ask them r you teetotlar, they would probably reply yes.
But it is all good.
I have working code for:
Read all lines one by one
Check for teetotlar word
Again check if that have "Yes" or "No" and then save that value in one variable
What I want:
Is to have a regex which just checks for the word Teetotlar
in the whole text and then looks for value Yes
or No
in the same line.