words - Replace new lines with a comma delimiter with Notepad++? -
i have notepad++ question.
how can take below words in notepad++ (which on different lines)
apples apricots pear avocados bananas
and turn them paragraph comma @ end of each one? this:
apples, apricots, pear, avocados, bananas
open find , replace dialog (press ctrl+h).
then select regular expression
in 'search mode' section @ bottom.
in find what
field enter this: [\r\n]+
in replace with
: ,
there space after comma.
this replace lines like
apples apricots pear avocados bananas
where there empty lines.
if lines have trailing blank spaces should remove first. simplest way achieve is
edit -> blank operations -> trim trailing space
or
textfx -> textfx edit -> trim trailing spaces
be sure set search mode "regular expression".
Comments
Post a Comment