如何用Sublime Text实现正则查找与替换

比如将下面的汉字语义加上中括号

[
  {
    "text": "微笑",
    "path": "emot01.png"
  },
  {
    "text": "大笑",
    "path": "emot02.png"
  },
  {
    "text": "鼓掌",
    "path": "emot03.png"
  },
  {
    "text": "为什么",
    "path": "emot04.png"
  },
  {
    "text": "哭",
    "path": "emot05.png"
  },
  {
    "text": "怒",
    "path": "emot06.png"
  }
]

查找正则("text":\s*")([^"]*)(")

替换"text": "[${2}]"

 

posted @ 2024-04-26 16:55  张林峰  阅读(481)  评论(0编辑  收藏  举报