Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to rearrange data in ABC:XYZ Format.

    Help wanted · · · – – – · · ·
    4
    5
    66
    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.
    • LokeshS58855077
      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 Kilborn PeterJones 2 Replies Last reply Reply Quote 0
      • Alan Kilborn
        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
        • PeterJones
          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 Kilborn
            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 Thrope 1 Reply Last reply Reply Quote 1
            • Lycan Thrope
              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
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors