有没有一种方法可以将一行的答案复制并替换为另一行,而不会影响原始行?例如
纹理=“cnwl”
icao_航空公司=
我希望它知道 icao_airline=引号中的前三个字母
答案1
不完全确定我是否充分理解您的需求,但我猜您想要的是:
- Ctrl+H
- 找什么:
Texture="(...).*?"[\s\S]+?icao_airline=\K.*$
- 用。。。来代替:
"$1"
- 查看 环绕
- 查看 正则表达式
- 取消选中
. matches newline
- Replace all
解释:
Texture=" # literally
(...) # group 1, 3 any characters but newline
.*? # 0 or more any character but newline, not greedy
" # quote
[\s\S]+? # 1 or more any character
icao_airline= # literally
\K # forget all wee have seen until this position
.* # 0 or more any character but newline
$ # end of line
替代品:
"$1" # content of group 1 surounded with quotes
截图(之前):
截图(之后):