[RegEx] [Notepad++] Delete all similar 1st 3 characters string lines


  1. Posts : 20
    Windows 10 Pro
       #1

    [RegEx] [Notepad++] Delete all similar 1st 3 characters string lines


    Hello guys!

    I am trying to delete lines with similar first 3 characters using RegEx

    I figured out this:

    ((?<=\n)|^)([^\n]{3})([^\n]\n)(.\n)?\2[^\n]*($|\n)

    However, it marks only 1 duplicate.

    How to let it mark all the other duplicates?

    Can somebody please fix the RegEx?

    Thanks in advance!

    Regards,
    addas
      My Computer


  2. Posts : 20
    Windows 10 Pro
    Thread Starter
       #2

    A good example would be if I have these text:
    Code:
    abcd
    abce
    abcg
    ebgf
    ebsf
    I should select "abcd" "abce" "abcg" and mark them and delete them not only the first instance "abcd"
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:18.
Find Us




Windows 10 Forums