EmEditor (text editor) Forum Index
   Regular Expressions
     how to delete duplicate lines
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Deipotent
Posted on: 8/10/2011 12:21 pm
Just can't stay away
Joined: 2/15/2008
From:
Posts: 118
Re: how to delete duplicate lines
I needed this functionality recently and thought it could be done easily with regex. Google led me to http://www.regular-expressions.info/duplicatelines.html which said to sort the lines, and then search for the following:

^(.*)(\r?\n\1)+$


and replace with:

\1


Unfortunately, I couldn't get this to work in EmEditor, even after enabling the option to search past line boundaries.

Can you add support for this type of regex to EmEditor ?

PS. I haven't tried the macro yet, and am sure it works fine, but it would be nice if it could be done with regex.
Flat Previous Topic | Next Topic


Subject Poster Date
   how to delete duplicate lines user 9/29/2006 7:27 am
     Re: how to delete duplicate lines Yutaka 9/29/2006 11:56 am
       Re: how to delete duplicate lines user 9/29/2006 12:42 pm
       Re: how to delete duplicate lines Hellados 4/18/2009 1:10 am
         Re: how to delete duplicate lines Yutaka 4/18/2009 1:26 pm
           Re: how to delete duplicate lines Salabim 1/3/2010 10:33 am
             Re: how to delete duplicate lines Yutaka 1/4/2010 9:51 pm
               Re: how to delete duplicate lines Salabim 1/5/2010 11:07 pm
     » Re: how to delete duplicate lines Deipotent 8/10/2011 12:21 pm
         Re: how to delete duplicate lines Yutaka 8/10/2011 1:11 pm
           Re: how to delete duplicate lines Deipotent 8/10/2011 3:50 pm
             Re: how to delete duplicate lines Yutaka 8/10/2011 4:37 pm
     Re: how to delete duplicate lines Monkeyman 6/5/2011 12:47 pm
       Re: how to delete duplicate lines raikrivera 7/28/2011 1:36 am

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文