简体   繁体   English

在记事本++中搜索并附加正则表达式

[英]Search and append with regex in Notepad++

I have the following text: 我有以下文字:

3/1 

I want to amend it to be: 我想将其修改为:

3/1 port id

您不能只搜索并替换为3/1并用3/1 port id替换它吗?

Find this: (\\d+\\/\\d+) 查找此内容: (\\d+\\/\\d+)

This means "the group of: 1 or more digits followed by a forward slash followed by 1 or more digits" 这表示“一组:1个或多个数字,后跟一个正斜杠,然后是1个或多个数字”

Then replace with this: \\1 port id 然后替换为: \\1 port id

Which means "the first group found followed by the literal text: ' port id'" 意思是“找到的第一个组,后跟文字文本:'port id'”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM