我想知道如何使用python搜索特定的字符串。其实我打开它含有片状下方的降价文件:使用python搜索字符串
| --------- | -------- | --------- |
|**propped**| - | -a flashlight in one hand and a large leather-bound book (A History of Magic by Bathilda Bagshot) propped open against the pillow. |
|**Pointless**| - | -“Witch Burning in the Fourteenth Century Was Completely Pointless — discuss.”|
|**unscrewed**| - | -Slowly and very carefully he unscrewed the ink bottle, dipped his quill into it, and began to write,|
|**downtrodden**| - | -For years, Aunt Petunia and Uncle Vernon had hoped that if they kept Harry as downtrodden as possible, they would be able to squash the magic out of him.|
|**sheets,**| - | -As long as he didn’t leave spots of ink on the sheets, the Dursleys need never know that he was studying magic by night.|
|**flinch**| - | -But he hoped she’d be back soon — she was the only living creature in this house who didn’t flinch at the sight of him.|
我必须从与装饰各行得到的字符串| ** |,如:
- 撑起
- 无意义
- 拧开
- 受压迫
- 片
- flinch
我试图使用正则表达式但未能提取它。
原始markdown文件内容如下所示: --------- | -------- | --------- | | **支持** | - | - 一只手电筒和一个大皮革书(Bathilda Bagshot的魔术史)在枕头上张开。 | | **毫无意义** | - | - “十四世纪的女巫燃烧毫无意义 - 讨论。” –
有[在线正则表达式测试器](https://regex101.com/)使用Python风格的正则表达式 - 它们对于微调模式非常有用。 – wwii
您正在搜索的文本中是否有'''**'''字符? – wwii