Community
    • Login

    How to rearrange data in ABC:XYZ Format.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 820 Views 2 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.
    • LokeshS58855077L Offline
      LokeshS58855077
      last edited by

      I have data in following format :

      1st line ; ABC
      2nd line : XYZ

      and i want the thousands of lines in ABC:XYZ format.

      Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @LokeshS58855077
        last edited by Alan Kilborn

        @LokeshS58855077

        Problem statement is a bit “light”, but going by what was provided:

        Find what: \R
        Replace with: :
        Search mode: Regular expression
        Wrap around: checked
        Action: Replace All

        1 Reply Last reply Reply Quote 1
        • PeterJonesP Offline
          PeterJones @LokeshS58855077
          last edited by

          @LokeshS58855077 ,

          Like Alan, I think your description is a big light. But since you said,

          i want the thousands of lines in ABC:XYZ format

          I would modify Alan’s like,
          FIND = (?-s)\R(.*(\R|\Z))
          REPLACE = :$1
          SEARCH MODE = Regular Expression

          That way, every pair of lines will be joined, so

          ABC
          XYZ
          123
          PDQ
          ABC
          XYZ
          123
          PDQ
          

          will become

          ABC:XYZ
          123:PDQ
          ABC:XYZ
          123:PDQ
          
          1 Reply Last reply Reply Quote 3
          • Alan KilbornA Offline
            Alan Kilborn
            last edited by Alan Kilborn

            Ah, yea, a possible scenario that didn’t even occur to me.
            People really have to be more explicit about what they want, and show more than a trivial amount of data.
            So far the people who have answered have put more effort in than the petitioner!!

            Lycan ThropeL 1 Reply Last reply Reply Quote 1
            • Lycan ThropeL Offline
              Lycan Thrope @Alan Kilborn
              last edited by Lycan Thrope

              @Alan-Kilborn ,
              Yeah, and it sounds like someone just got their homework done, or the ChatGPT AI is at work building it’s data banks. :)

              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