• Login
Community
  • Login

can no emails formattad

Scheduled Pinned Locked Moved General Discussion
5 Posts 4 Posters 363 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.
  • D
    Dj.Michael-Beil. de - OMT24 Corp.
    last edited by Dj.Michael-Beil. de - OMT24 Corp. Nov 29, 2023, 8:33 PM Nov 29, 2023, 8:30 PM

    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
    C 1 Reply Last reply Nov 29, 2023, 9:14 PM Reply Quote 1
    • C
      Coises @Dj.Michael-Beil. de - OMT24 Corp.
      last edited by Nov 29, 2023, 9:14 PM

      @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
      • G
        guy038
        last edited by guy038 Nov 30, 2023, 11:34 AM Nov 30, 2023, 11:33 AM

        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

        M 1 Reply Last reply Nov 30, 2023, 6:30 PM Reply Quote 0
        • M
          mkupper @guy038
          last edited by Nov 30, 2023, 6:30 PM

          @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
          • G
            guy038
            last edited by Dec 2, 2023, 10:29 AM

            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
            3 out of 5
            • First post
              3/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors