Convert multiple lines of text in a single

2011-05-20
2012-11-14
  • Juan Carlos

    Juan Carlos - 2011-05-20

    Hi, I want to convert a text in several lines of text on a single line formed by these lines separated by ','
    For example, I have this:

    Madrid 
    Murcia 
    Barcelona 
    Burgos
    

    and I want to convert it to

    Madrid, Murcia, Barcelona, Burgos
    

    Anybody can help me?

    Br

     
  • John Byrne

    John Byrne - 2011-05-31

    A Python script that will do the trick.
    Just select the required lines and then run the script.

    editor.pymlreplace("\r\n",", ",0,0,editor.getSelectionStart(),editor.getSelectionEnd())
    editor.pymlreplace(" ,",",",0,0,editor.getSelectionStart(),editor.getSelectionEnd())

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks