It will be better if I show what I mean.
Here are some selections from a data set I am parsing:
1.【ひろゆき】万能ねぎとわけぎと記憶力。Grimbergen blondeを呑みながら。2020/12/18 V23
2.【ひろゆき】日本酒は鮮度が大事ですよ。 獺祭を呑みながら 2019/02/11
3.【ひろゆき】聞かれたことに答えてみようの回。Cheshire Chocolate Porter飲みつつ。
4.【ひろゆき】早起きは得しないし、体に悪いよね。。Lagunitas IPAを呑みながら 2019/04/14 D23
I am trying to grab the name of the beverege. In 1 it is "Grimbergen blonde", in 2 "獺祭" it is in 3 it is "Cheshire Chocolate Porter", in 4 it is "Lagunitas IPA"
I have tried using the following pattern:
pattern = re.compile('(?<=[\?。!]).*(?=を[飲呑])')
I see that the drink is always immediately followed by を or 呑 / 飲. I also see that the drink is always immediately after 。 or ?.
How can this be done?