Community
    • Login

    copy all mobile numbers starting with 9

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    regexcopymobilenumbers
    4 Posts 3 Posters 856 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.
    • Amazon BooksA
      Amazon Books
      last edited by Amazon Books

      Hello, I have a text file containing entries like this (each on a separate line):
      1592-239300 / 232326, 94143059
      261180, 9416475681
      295511,
      , 9811885806
      and so forth.
      How to extract all mobile numbers from this file, that is, only those 10-digit numbers that start with the digit 9 ? That is, copy the highlighted results by notepad++ and paste them in another text file. With regex \d{10}, the results are highlighted, but not able to copy them and paste them elsewhere.
      Thanks.

      Paul WormerP 1 Reply Last reply Reply Quote 0
      • Paul WormerP
        Paul Wormer @Amazon Books
        last edited by

        @Amazon-Books An easy way to copy number to the clipboard is by the Python Script command editor.copyText(str(number)). But you need to install the PS plugin for that.

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

          Hello, @amazon-books, @paul-wormer and All,

          Really not difficult to achieve !

          • Open the Mark dialog ( Ctrl+ M )

          • SEARCH 9[0-9]{9}

          • Un-tick all options

          • Tick the Purge for each search and Wrap around box options

          • Select the Regular expression search mode

          • Click on the Mark All button

          • Click on the Copy Marked Text button

          • Open a new tab ( Ctrl + N )

          • Paste the marked text ( Ctrl + V )

          Here you are !

          Best Regards,

          guy038

          Paul WormerP 1 Reply Last reply Reply Quote 1
          • Paul WormerP
            Paul Wormer @guy038
            last edited by

            @guy038 Thank you. I always overlooked the button Copy Marked Text. Now I understand that it copies to the clipboard, good to know!

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