regex - Match Partially Duplicated Lines -
I have rows in a list that are sometimes similar to the first "space" character, then can change ( I.e. a date later).
Vooller Joule / 12/12 bilis joule / 13/13 chess joule / 14/12 tcrice joule / 12/12 I can easily Sort the lines from, but I would love to remove duplicate later dated entry. I have received a Rezox suggestion, but it only matches that line, the need to be able to mark the entire line of the same username in the file Here are my examples given above The row will be highlighted at 1 and 3.
(edited for clarity)
See duplication from one line to another For PCRE engine (used by Notepad ++), there will be a compact formula (? M) ^ (\ S +). * \ R (? S). *? \ K \ 1 This will work in N ++
As you remove the duplicate line, more can be marked, because initially the regd stops at interval lines to highlight duplicates.
Explanation -
Code> ^ and $ to match each line -
Turns on multi-line mode ( Anchor claims that we are at the beginning of the string -
(\ S +) group 1 gets non-space character -
. * gets done at the end of the line -
\ r line break -
(? S) DOTALL mode, allowing the dot to be matched in lines -
. *? By matching the lazy ... -
\ K indicates what the match was matched so far from the last match -
\ 1 Back-Reference: Match what group 1 was previously captured. >
Comments
Post a Comment