我想更换我所有的
$r->fields[variables]
到
$r->fields["variables"]
谁能告诉我怎么做?
答案1
您可以使用:
- Ctrl+H
- 寻找:
\$\w+->\w+\[\K\w+
- 代替:
"$0"
- Replace all
解释:
\$ # $ sign
\w+ # 1 or more word character
-> # literally
\w+ # 1 or more word character
\[ # [ character
\K # forget all we have seen until this position
\w+ # 1 or more word character (you can use .+? if your variable contains other character than word character)
截图(之前):
截图(之后):