Here is my input string
2014.10.30: b
l
ah bl
a
h
2014.10.30: bfoo
lah
b
l
ah
2014.10.30: bart1
lah
baloon
l
ah
2014.10.30: carb
lah
b
l
ah
2014.10.30: farb2
lah
baloon
l
ah
2014.10.30: carb
lah
b
l
ah
2014.10.30: bom
lah
baloob
l
ah
etc
I would like to match the following (between the 2014 which has the word baloon inside them):
2014.10.30: bart1
lah
baloon
l
ah
and
2014.10.30: farb2
lah
baloon
l
ah
This is what I have,
/(2014)(.*?baloon.*)(?:2014)/gsmi
and this is matching from the beginning of the first occurrence of 2014. And its returning only one match with bottom to top. regex101 here