Community
    • Login

    copy all mobile numbers starting with 9

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    regexcopymobilenumbers
    4 Posts 3 Posters 1.3k Views 1 Watching
    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 Offline
      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 Offline
        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 Online
          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 Offline
            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors