Notepad++ 关于替换值的正则表达式问题
Notepad++ Regex Question about Replacing Values
我对正则表达式一无所知,所以我在这里寻求帮助
我在 .txt 中有以下格式
Code = ZU2J2 | Code Made By = Name1234 | Points = 1337
Code = BAC34 | Code Made By = Name1334 | Points = 1338
Code = KDLS3 | Code Made By = Name3436 | Points = 1122
Code = HSKD3 | Code Made By = Name3434 | Points = 1336
我想 remove/replace 除了最后的代码之外的所有内容
它应该是这样的
ZU2J2
BAC34
KDLS3
HSKD3
按 Ctrl+H 打开“替换”菜单。检查 "Regular expression" 按钮。
通过使用:
查找内容:Code = (\w+) \|.+
替换为:</code></p>
<p>它会return你</p>
<pre><code>ZU2J2
BAC34
KDLS3
HSKD3
我对正则表达式一无所知,所以我在这里寻求帮助
我在 .txt 中有以下格式
Code = ZU2J2 | Code Made By = Name1234 | Points = 1337
Code = BAC34 | Code Made By = Name1334 | Points = 1338
Code = KDLS3 | Code Made By = Name3436 | Points = 1122
Code = HSKD3 | Code Made By = Name3434 | Points = 1336
我想 remove/replace 除了最后的代码之外的所有内容
它应该是这样的
ZU2J2
BAC34
KDLS3
HSKD3
按 Ctrl+H 打开“替换”菜单。检查 "Regular expression" 按钮。
通过使用:
查找内容:Code = (\w+) \|.+
替换为:</code></p>
<p>它会return你</p>
<pre><code>ZU2J2
BAC34
KDLS3
HSKD3