Community
    • Login

    can no emails formattad

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 4 Posters 356 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dj.Michael-Beil. de - OMT24 Corp.D
      Dj.Michael-Beil. de - OMT24 Corp.
      last edited by Dj.Michael-Beil. de - OMT24 Corp.

      Hi, I wanted to ask if someone knows how I can put an SQL file and that contain emails table in quotation marks (')

      Example: (is not yet formatted)
      (3000.1, info(ät)online-media-team.domain , 0),

      • I want to put the emails all in (') quotes, but I don’t know how to do this with Notepad ++ PS: There are about 300 emails.
        can someone help me
      CoisesC 1 Reply Last reply Reply Quote 1
      • CoisesC
        Coises @Dj.Michael-Beil. de - OMT24 Corp.
        last edited by

        @Dj-Michael-Beil-de-OMT24-Corp
        I think you mean you have lines like this:

        (3000.1, info@online-media-team.domain , 0),
        

        and you want lines like this:

        (3000.1, 'info@online-media-team.domain' , 0),
        

        If that’s it, select Search | Replace… from the menu, then fill in:

        Find what : \b([^\s,]+@[^\s,]+)\b
        Replace with : '$1'
        Search Mode : Regular expression

        and click the Replace All button.

        Note: Precisely validating an email address, to accept all properly-formed email addresses and only properly-formed email addresses, is trickier than one might think. In context, the expression above will probably work; but check the results to be sure nothing unexpected happened. The expression can be refined to be more precise, if it fails, depending on just what is going wrong.

        1 Reply Last reply Reply Quote 3
        • guy038G
          guy038
          last edited by guy038

          Hello, @Dj.Michael-Beil.-de-OMT24-Corp, @coises and All,

          @Coises, an alternative solution could simply be :

          SEARCH [^\s,]+@[\^s,]+

          REPLACE '$0'

          OR

          SEARCH (?!,)\S+@(?!,)\S+

          REPLACE '$0'

          Best Regards,

          guy038

          mkupperM 1 Reply Last reply Reply Quote 0
          • mkupperM
            mkupper @guy038
            last edited by

            @guy038 I think your first search expression was supposed to be [^\s,]+@[^\s,]+ which also has a nice symmetry.

            1 Reply Last reply Reply Quote 1
            • guy038G
              guy038
              last edited by

              Hello, @dj.michael-beil.-de-omt24-corp, @coises, @mkupper and All,

              Yes,… Indeed, just a typo :-((

              So, regarding my first regex search expression, the right syntax is the @mkupper’s one !

              BR

              guy038

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors