【发布时间】:2022-08-13 08:01:07
【问题描述】:
是否可以通过忽略 Notepad++ 中的标点符号和空格来删除重复项?我会保留其中一个匹配的行(保留哪个无关紧要)。
我的示例来自 txt 文件:
Rough work iconoclasm but the only way to get the truth. Oliver Wendell Holmes
Rough work, iconoclasm, but the only way to get the truth. Oliver Wendell Holmes
Rule No. 1: Never lose money. Rule No. 2: Never forget rule No. 1. Warren Buffett
Rule No.1: Never lose money. Rule No.2: Never forget rule No.1. Warren Buffett
Self-esteem isn\'t everything, it\'s just that there\'s nothing without it. Gloria Steinem
Self-esteem isn\'t everything it\'s just that there\'s nothing without it. Gloria Steinem
You said she\'s a senior? Babe we\'re all crazy.
You said, she\'s a senior! Babe we\'re ALL crazy.
You said, she\'s a senior? Babe we\'re ALL crazy!
结果我需要:
Rough work iconoclasm but the only way to get the truth. Oliver Wendell Holmes
Rule No. 1: Never lose money. Rule No. 2: Never forget rule No. 1. Warren Buffett
Self-esteem isn\'t everything, it\'s just that there\'s nothing without it. Gloria Steinem
You said, she\'s a senior! Babe we\'re ALL crazy.
我可以使用正则表达式删除 100% 匹配的重复项,但找不到忽略空格和标记的正则表达式规则。
-
是的,重复的行总是连续的,因为我首先对行进行排序。
标签: regex text duplicates notepad++