Regular expression search to find lines beginning with same characters


You can run a Regex search which will find consecutive lines that begin with the same characters. This search:


^((.{10}).*)(?:\r?\n\2.*)+


. . . will check the first 10 characters at the beginning of a line and check to see if the same 10 characters appear at the start of the next line.



. . . adding $1 in the replace window will remove each duplicate line.