例如:第 1 行是这样的
Adobe Ceiling EngramEntry_AdobeCeiling_C 106 5 15
我想删除除以下之外的所有内容:
EngramEntry_AdobeCeiling_C
答案1
答案2
确保更换仅有的包含 EngramEntry_AdobeCeiling_C
但不包含的行blah_EngramEntry_AdobeCeiling_C_blah
,您必须使用词边界:
- Ctrl+H
- 找什么:
^.+?\b(EngramEntry_AdobeCeiling_C)\b.+$
- 用。。。来代替:
$1
- 查看 相符
- 查看 环绕
- 查看 正则表达式
- 取消选中
. matches newline
- Replace all
解释:
^ # beginning of line
.+? # 1 or more any character but newline, not greedy
\b # word boundary, make sure we haven't word character just before
(EngramEntry_AdobeCeiling_C) # group 1, literally
\b # word boundary, make sure we haven't word character just after
.+ # 1 or more any character but newline
$ # end of line
替代品:
$1 # content of group 1, i.e. "EngramEntry_AdobeCeiling_C"
截图(之前):
截图(之后):