Community
    • Login

    How to join 4 line in 1 onbig file

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 1.8k 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.
    • Sabah SiddiquiS
      Sabah Siddiqui
      last edited by

      Dear,
      i have file notepad++ the same below:
      id=1
      abc
      cda
      dac
      id=2
      dif
      dfq
      dfr
      id=3
      gas
      fga
      dqf
      …
      (more line)

      How to join fast 4 line in to 1:
      result:
      id=1 | abc | cda | dac |
      id=2 | dif | dfg | dfr |
      id=3 | gas | fga | dgf |
      …

      Thank you

      1 Reply Last reply Reply Quote 0
      • Matyáš KrupičkaM
        Matyáš Krupička
        last edited by

        replace with regular expression mode

        (^id.*)\r\n(.*)\r\n(.*)\r\n(.*)
        with
        \1 | \2 | \3 | \4 |

        It is pretty ugly regexp, but will do the trick

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