Community
    • 登入

    How to join 4 line in 1 onbig file

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    2 貼文 2 Posters 1.8k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Sabah SiddiquiS
      Sabah Siddiqui
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Matyáš KrupičkaM
        Matyáš Krupička
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • 第一個貼文
          最後的貼文
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors