我有一个如下的 Markdown 文件:
#2016-12-24
| 单词 | 解释 | 例句 |
| --------- | -------- | --------- |
|**accelerator;**| - | - |
|**compass**| - | - |
|**wheels**| - | - |
|**fabulous**| - | - |
|**sweeping**| - | - |
|**prospect**| - | - |
|**pumpkin**| - | - |
|**trolley**| - | - |
|snapped,**| - | - |
|tip| - | - |
|lap| - | - |
|tether.| - | - |
|damp| - | - |
|triumphant| - | - |
|sarcastic| - | - |
|missed out| - | - |
|sidekick| - | - |
|considerable| - | - |
|Willow.| - | - |
|eagle.| - | - |
|considerably.| - | - |
|flat.| - | - |
|feast| - | - |
|scramble| - | - |
|turned up| - | - |
|rounded off| - | - |
|rat| - | - |
|resembled| - | - |
|By the time she had clambered back into the car,| - | - |
|By the time she had clambered back into the car, they were running very late,| - | - |
|wheeled his trolley| - | - |
|barrier,| - | - |
|bounced| - | - |
|in blazes| - | - |
|clutching| - | - |
|sealed| - | - |
|stunned.| - | - |
|‘We’re stuck,| - | - |
|marched off| - | - |
|accelerator| - | - |
|and the prospect of seeing Fred and George’s jealous faces| - | - |
|protest.| - | - |
|in protest.| - | - |
|horizon,| - | - |
|knuckles| - | - |
|metal| - | - |
|thick| - | - |
|reached the end of its tether.| - | - |
|Artefacts| - | - |
|blurted out.| - | - |
|gaped| - | - |
|I will be writing to both your families tonight.| - | - |
|‘Can you believe our luck, though?’| - | - |
|‘Skip the lecture,’| - | - |
|people’ll be talking about that one for years!’| - | - |
|nudged| - | - |
|‘I know I shouldn’t’ve enjoyed that or anything, but –’| - | - |
|dashed| - | - |
我想提取如下句子:
- 当她爬回车里时,
- 当她爬回车里时,他们已经很晚了,
- 推着他的手推车
- ‘我们被困住了,
- 还有可能看到弗雷德和乔治嫉妒的脸
- 已达到极限。
- 今晚我会写信给你们双方的家人。
- “不过,你能相信我们的运气吗?”
- “跳过讲座”,
- 人们会谈论这个多年!’
- “我知道我不应该喜欢那个或任何东西,但是 –”
我在 regex101 中尝试这样做网站,但实际上每次都匹配。
谁能帮帮我?
请您参考如下方法:
试试这个:
^\|[^\w\|]*(\w+\s+(?=\w+)[^\|]*)
^\|如果该行以竖线 (|) 开头则匹配[^\w\|]*抓取任何不在 a-z0-9 和 | 中的东西
\w+\s+确保其后跟一个词和一个或多个 空白(?=\w+)然后检查后面是否还有更多的词[^\|]*如果找到先前的条件则抓取任何东西直到 下一个管道 |
对于每场比赛,第 1 组包含您想要的句子
