as Transpose list (como Transponer listado)



  • 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,



  • 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



  • 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.



  • 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


Log in to reply