Community
    • Login

    as Transpose list (como Transponer listado)

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 3 Posters 6.4k 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.
    • Francisco Chaipul CotalF
      Francisco Chaipul Cotal
      last edited by

      Si tengo un listado:
      If I have a list:

      item 1,
      item 2,
      item 3,
      item 4,
      item 5,

      La idea es lograr esto:
      The idea is to achieve this:

      item 1,item 2,item 3,item 4,item 5,

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by

        Hello Francisco,

        Very easy with a simple search/replacement, in regular expression search mode :)

        • Open the Replace dialog

        • SEARCH \R

        • REPLACE leave Empty

        • If , you previously created a selection, check the In selection option

        • Select the Regular expression search mode

        • Finally, click on the Replace All button

        Notes :

        • The syntax \R stands for all types of End of Line characters

        • If you need a space, AFTER each comma, just write a single space, in the replace zone

        Et voilà !

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 0
        • Scott SumnerS
          Scott Sumner
          last edited by

          If the space after each comma is acceptable, highlight the lines you want to be affected, then select the Edit menu, choose Line Operations, then choose Join Lines. This is a bit simpler than the regex solution, although that works just fine, too.

          1 Reply Last reply Reply Quote 0
          • guy038G
            guy038
            last edited by

            Hi Scoot,

            Yeah, you’re right. In addition, if you previously did a selection, only the selected lines are joined :)

            But just consider that the way to always solve things, with regexes, is really my besetting sin !!

            Cheers,

            guy038

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