Community
    • Login

    Select data between tabs

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 4 Posters 1.3k Views 3 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.
    • John CurreyJ Offline
      John Currey
      last edited by

      Hi, I have a tab-delimited file. I’m writing a macro, and I’d like to select data between 2 tabs, and copy it to the clipboard. I can get to the correct spot, but can’t figure out how to select the data that is between the 2 tabs so I can copy it.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • Terry RT Offline
        Terry R
        last edited by

        @John-Currey said in Select data between tabs:

        how to select the data that is between the 2 tabs so I can copy it.

        Well, a regex (regular expression) would do it. Of course without knowing much of the sample data I can only work with the little you have stated.

        So using the “Find” function, and set search mode to regular expression.
        Find What:(?-s).+?\t
        Then use the “Find Next” button. See if that can be incorporated into your macro. This regex will also include the next tab, I was unsure whether you did want that or not.

        Terry

        1 Reply Last reply Reply Quote 3
        • Terry RT Offline
          Terry R
          last edited by

          @Terry-R said in Select data between tabs:

          This regex will also include the next tab,

          Another better one which does NOT include the next tab is [^\t]+

          Terry

          1 Reply Last reply Reply Quote 4
          • John CurreyJ Offline
            John Currey
            last edited by

            Terry,

            Thank you, that is exactly what I needed!

            1 Reply Last reply Reply Quote 1
            • Vasile CarausV Offline
              Vasile Caraus
              last edited by

              @John-Currey said in Select data between tabs:

              select data between 2 tabs

              Can anyone tell more precisely, what it means “select data between 2 tabs” ?
              An example will be perfect, as to understand much easier.

              PeterJonesP 1 Reply Last reply Reply Quote 0
              • PeterJonesP Offline
                PeterJones @Vasile Caraus
                last edited by

                @Vasile-Caraus ,

                The OP’s data has a TAB character (\t or \x09) followed by some data followed by a TAB character, and wants to select the data that comes between two
                490bb2c0-2678-4ac6-831e-4bcc3a6a1dd7-image.png

                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