可以以某种方式自动替换为该结果:
初始:
"eye","doc":441,"engagement":35877,"impression":1987869,"reach":294757,"repost":441}}
结果:
{"emojiAnnotations":{"eye","doc":441,"engagement":35877,"impression":1987869,"reach":294757,"repost":441}}
当“眼睛”等是变量时......(仅标题相同)?
我想使用-类似于-“ *”,“ doc”用{“ emojiAnnotations”:“ *”,“ doc”替换(作为表达式),但这不会保留变量“ eye”等
建议。这是替换过程的一部分,因此一开始就不能添加
答案 0 :(得分:1)
这样可以吗?
"[^"]+","doc"
{"emojiAnnotations":{$0
说明:
"[^"]+" : 1 or more not quote beweeen quotes
,"doc" : literally
替换:
{"emojiAnnotations":{ : literally
$0 : the whole match
给定示例的结果
{"emojiAnnotations":{"eye","doc":441,"engagement":35877,"impression":1987869,"reach":294757,"repost":441}}