我有将近2万行的文档。许多(但不是全部)行使用星号符号表示重要的单词和短语。 例: What kind of *vegetable* is it? You are *best?!* I hope I am not late. All *the "good"* shows are *no longer* broadcasting. 我想用html粗体标签替换星号符号。例如,它看起来像这样: What kind of <b>vegetable</b> is it? You are <b>best?!</b> I hope I am not late. All <b>the "good"</b> shows are <b>no longer</b> broadcasting. 最好的方法是什么?我不能仅仅进行查找和替换,因为</b>在需要时它不会插入适当的结束标记。 …