I want a regex to catch everything inside occurrences of a specific word say hello.
left inclusive and right exclusive.
hello all everything hello eve will give hello all everything and hello eve.
I am using hello.*(?=hello) using reference from Here, see Demo. But it only match once and i tried some possibility no luck. Is it possible?
input:
hello i am xyz lol hello i
am abc ..;sda<>
hello
i am pqr ahe kiop hello
abc axyz
no
yes
hepdd
jol
hello
podjkd
dasfh
output expected:
1:hello i am xyz lol
2:hello i
am abc ..;sda<>
3:hello
i am pqr ahe kiop
4:hello
abc axyz
no
yes
hepdd
jol
5:hello
podjkd
dasfh