• Login
Community
  • Login

Copy all Phone numbers

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 3 Posters 1.1k 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.
  • M
    Mobil Meister
    last edited by Dec 24, 2022, 7:53 PM

    Hello dear notepad++ user,
    I have a text file,
    and the data is always in this format:

    Name: xxx
    Family name: xxx
    Date of birth: xxxxx
    Street: xxxxx
    No.: xx
    City code: xxxxxx
    City: xxxxxxxx
    Floor: xxxx
    Location: xxxxx
    Telephone: xxxxxxxx
    Email: xxxxxxxxx@xxxxxxxxxxx.xx
    IBAN: xxxxxxxxxxxx
    xxxxxxxxx

    I only want to copy the line “Telephone” into another file,
    preferably separated by commas,

    so he should copy the content of the line Telephone: after the colon into a separate file or into the same file somewhere at the end, preferably one after the other. so

    12346,123465,123125,12312315,12312315

    thanks

    A 1 Reply Last reply Dec 24, 2022, 8:34 PM Reply Quote 0
    • A
      Alan Kilborn @Mobil Meister
      last edited by Dec 24, 2022, 8:34 PM

      @Mobil-Meister

      For the first part, do a Mark operation:

      Try:

      Press Ctrl+m to invoke Mark
      Find what box: (?-is)^Telephone: \K.+
      Wrap around checkbox: check it
      Search mode radiobuttons: select Regular expression
      Press Mark All button
      Press Copy Marked Text button

      Learn to answer questions of this kind yourself in the future; start reading HERE and also check out the N++ user manual’s searching section HERE .

      N M 2 Replies Last reply Dec 24, 2022, 9:16 PM Reply Quote 3
      • N
        Neil Schipper @Alan Kilborn
        last edited by Neil Schipper Dec 24, 2022, 9:17 PM Dec 24, 2022, 9:16 PM

        @Alan-Kilborn said in Copy all Phone numbers:

        start reading HERE

        Since OP doesn’t appear to know how to do some/all of the non-regex tasks:

        • Find all in current doc
        • In search results pane, Copy Selected Line(s)
        • Using normal mode Find and Replace with empty replace field to delete
        • Using extended mode Find and Replace to convert line ending to comma

        I’m quite certain OP is not ready for the very complex regex documentation article you linked.

        A 1 Reply Last reply Dec 24, 2022, 9:55 PM Reply Quote 1
        • M
          Mobil Meister @Alan Kilborn
          last edited by Dec 24, 2022, 9:28 PM

          @Alan-Kilborn
          thanks it worked!

          is it possible to find all double entries?
          not 1by1
          i mean like “delete all doubly entries”

          A 1 Reply Last reply Dec 24, 2022, 9:58 PM Reply Quote 1
          • A
            Alan Kilborn @Neil Schipper
            last edited by Dec 24, 2022, 9:55 PM

            @Neil-Schipper said in Copy all Phone numbers:

            I’m quite certain OP is not ready for the very complex regex documentation article you linked.

            I said …start reading HERE…
            :-)

            1 Reply Last reply Reply Quote 1
            • A
              Alan Kilborn @Mobil Meister
              last edited by Dec 24, 2022, 9:58 PM

              @Mobil-Meister said in Copy all Phone numbers:

              is it possible to find all double entries?

              If you have the phone numbers, and only the phone numbers, one per line, then you could use this command:

              a6ab81c1-421e-458c-9afe-c1be304dd94b-image.png

              M 1 Reply Last reply Dec 24, 2022, 11:59 PM Reply Quote 2
              • M
                Mobil Meister @Alan Kilborn
                last edited by Dec 24, 2022, 11:59 PM

                @Alan-Kilborn
                thank you,
                that work very well

                problem is if I read most of the time I don’t know what they mean, because I’m asking the wrong questions

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