【发布时间】:2020-04-15 17:07:11
【问题描述】:
我有一句话:
'hi how <unk> are you'
我需要从中删除<unk>。
这是我的代码:
re.sub(r'\b{}\b'.format('<unk>'), '', 'agent transcript str <unk> with chunks for key phrases')
为什么我的 RegEx 不适用于 <...>?
【问题讨论】:
-
<或>之间的空格没有单词边界