【问题标题】:How to to extract texts only from inside of the "Inverted Comma or Quotes" by using Notepad++如何使用 Notepad++ 仅从“引号或引号”内部提取文本
【发布时间】:2020-06-19 08:20:47
【问题描述】:

我有一个文本文档。我只想使用 Notepadd++ 或任何网站从“引号或引号”中提取文本

例如:

Lorem "Football" ipsum dolor "Cricket" sat amet, consectetur "Tennis" adipiscing "Asia" sed do "Europe" tempor "North America" ut labe “南美”多洛尔“澳大利亚”aliqua。 Ut "Africa" ad minim 威尼斯。

我只想从引号或引号中提取文本

足球 板球 网球 亚洲 欧洲 北美 南美 澳大利亚非洲

“足球”“板球”“网球”“亚洲”“欧洲”“北美”“南 美国”“澳大利亚”“非洲”

那我能做什么?任何人都可以帮助我..?

【问题讨论】:

    标签: web notepad++ ocr notepad data-entry


    【解决方案1】:

    (*SKIP)(*FAIL) 动词做你想做的事,见http://www.rexegg.com/regex-tricks.html

    • Ctrl+H
    • 查找内容:".+?" ?(*SKIP)(*FAIL)|.
    • 替换为:LEAVE EMPTY
    • 检查 环绕
    • CHECK 正则表达式
    • 取消选中 . matches newline
    • 全部替换

    说明:

    ".+?"       # string surrounded with quotes, you can use [“"'‘].+?[“"'‘] to process other quotes
     ?          # optional space
    (*SKIP)     # skip what it was matching before
    (*FAIL)     # force the failing of regex
      |           # OR
    .           # 1 any character
    

    屏幕截图(之前):

    截图(之后):

    【讨论】:

    • 感谢您的回复。你能把上面所有的代码都贴在这里吗?
    • @user2996362:对不起,我没听懂你的意思!正则表达式在这里。只需复制/粘贴即可。
    • 你能把上面的正则表达式粘贴在一起吗? ?
    • 我不明白你的意思。 “将正则表达式粘贴在一起”是什么意思?正则表达式在答案中,只需将其复制并粘贴到您的 Notepad++ 中。你想做什么?我给你解决你的问题,用它。只需按照我给你的七个步骤。
    • 您知道解决方案吗? :stackoverflow.com/questions/62477359/…
    猜你喜欢
    • 2020-10-31
    • 2023-03-06
    • 1970-01-01
    • 2016-10-22
    • 2018-04-18
    • 2012-07-07
    • 1970-01-01
    • 1970-01-01
    • 2013-11-19
    相关资源
    最近更新 更多