![]() ![]() Now, applying my regex S/R against this sorted text, ( still WITHOUT the comments ), would result in : 0040134 However, we should remember that the generic S/R (?-s)^(. \R)\1 is supposed to be run on pre-sorted data ! So, if we sort your data, we obtain : 0040134 // indented 2 TABS ![]() If we start, for instance, with the text below ( again, WITHOUT any comment ) : 0040067 So, assuming your data, WITHOUT the comments and their leading spaces 0040067 In replacement, all that block of lines is just replaced by the single line \1 Then the regex engine tries to match the greatest non-null number of the previous line \1 Then, after, any beginning of line ^, the part (. \R) matches all standard characters of current line, followed by its End of Line character(s)Īs enclosed in parentheses, the entire line is stored as group 1 Type in (?-s)^(. \R)\1 , in the Find what: zoneĬheck the two options Wrap around and Regular expressionįirst, the syntax (?-s) forces the regex engine to interpret any dot. If necessary, add a line-break, after the last line of your file I was wondering, on which kind of data, you needed the suppression of duplicate records, Luckily, with the advices, you’re just saying that your text is already sorted ! In that case, it’s very easy to remove duplicate records, indeed !! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |