【问题标题】:I need to find out odd and even occurences of double quotes我需要找出双引号的奇数和偶数出现
【发布时间】:2017-03-04 08:23:13
【问题描述】:

我需要在notepad++中逐行找出文本文件中双引号的奇偶出现,并用“和偶数替换”。

arch\" target=\"_blank\"\u003ELearn
more\u003C/a\u003E","hen":true,"h1":"en-IN","htt":"List
ening for \"Ok Google\"","im":"Click
\u003Cb\u003EAllow\u003C/b\u003E to start voice
search","iw":"Waiting...","lm":"Listening...","lu":"%1$
s voice search not available","ne":"No Internet
connection","nt":"Didn't get that. \u003Cspan\u003ETry

【问题讨论】:

  • 用双引号的html代码替换出现。上面它们在打开和关闭双引号中发生了变化。
  • 你不能用适当的引号替换所有出现的":""," 吗?
  • 不,我希望输出类似于..arch\“ target=\”_blank\“\u003E了解更多\u003C/a\u003E“,”hen“:true,”h1“:”en-IN“,”htt“:”List
  • 请在您的问题中提供示例输入的预期结果。

标签: regex replace find notepad++


【解决方案1】:

您需要分两次执行此操作:

  1. 替换属于一起的双引号对:

    查找内容: "(.*?)"
    替换为: “$1”

    选择正则表达式
    不要选中 . 匹配换行符复选框

  2. 替换任何剩余的悬空引号:

    查找内容: "
    替换为:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-09-02
    • 1970-01-01
    • 2022-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多