Navigation

    Community

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

    How to join 4 line in 1 onbig file

    Help wanted · · · – – – · · ·
    2
    2
    1591
    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 Siddiqui
      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čka
        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
        Copyright © 2014 NodeBB Forums | Contributors