How to mark lines with the first 10 characters duplicated
-
@Jose-Emilio-Osorio said in How to mark lines with the first 10 characters duplicated:
I assume that the first 10 characters are always digits and can be any combination?
-
@Ekopalypse
Can be any combination -
Is it important that we keep the lines as it is or can we sort the document first?
-
@Ekopalypse
The document is sorted by the first 10 characters.
I want to mark the lines first to check them, and then delete -
-
@Ekopalypse said in How to mark lines with the first 10 characters duplicated:
(.{10}).*\R\1
Thank you very much. It works.
Last question: How could I delete the line duplicated ? For example just the line 4 -
if it is not important which line gets deleted we could use
find what:
(.{10}).*\R(?=\1)
replace with is empty -
@Ekopalypse said in How to mark lines with the first 10 characters duplicated:
(.{10}).*\R(?=\1)
Thank you very much.
-
@Jose-Emilio-Osorio
If there are more two lines duplicated, can I use this regex ? -
1234567890;Example1;100
1234 ;Example2;200
1233334554;Example3;300
1234567890;Example7;700
I need to mark the line 1 and 4.
The document is sorted by the first 10 characters.
Hmmm, not seeing the document as being sorted… what am I missing?
-
@Jose-Emilio-Osorio said in How to mark lines with the first 10 characters duplicated:
If there are more two lines duplicated, can I use this regex ?
Yes, I guess so.
-
maybe just a copy/paste before the sorting took place.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login