How to delete duplicate emails, split multiple entries into their own lines and remove emails domain with @gmail.com

How to delete duplicate emails, split multiple entries into their own lines and remove emails domain with @gmail.com

2
NewbieNewbie
2

    Dec 07, 2021#1

    Hello. I'm new to UltraEdit app. if this questions has been asked before, my apologies

    Example:
    I have .csv files filled with dump emails and need to know how to delete duplicates then split multiple entries into their own lines, and remove emails domain with @gmail.com.

    here is the current view:

    [email protected]
    [email protected]; [email protected]; [email protected][email protected][email protected]


    here is the expected view:

    [email protected]
    [email protected]
    [email protected]
    [email protected]

    Thank you in advance.

    19176
    MasterMaster
    19176

      Dec 07, 2021#2

      Hi,

      You can use Perl regular expressions to achieve your goal.

      1st step - split multivalues lines
      F: [;,] *
      R: \r\n

      2nd step - delete lines with gmail email
      F: ^.*@gmail\.com\r\n
      R: <leave it empty>

      3rd step - remove duplicates
      3a) using Perl regex
      F: ^(.+)\r\n(?=(?s:.*?^\1$))
      R: <leave it empty>
      or
      3b) using sort lines (contemporary menu): Edit, Sort, Advanced sort/Options...  and check the option Remove Duplicates (RD)

      BR, Fleggy

      2
      NewbieNewbie
      2

        Dec 07, 2021#3

        Thank you!