我想知道如何使用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