In Notepad Plus Plus, when you have a list of strings and you want to have one line with these strings separated by a comma, you can use the Replace function.
Let’s assume you have this list
Apple
Orange
Strawberry
Banana
Kiwi
and you want this outcome:
Apple, Orange, Strawberry, Banana, Kiwi
Then do this: CTRL + H to open the Replace window. Then select Regular Expression in Search Mode. In the Find What, enter [\r\n]+. Then in the Replace with, enter the comma (,) and maybe followed by a space if you also want to add that.
Hi, may i know how to add quotes to be like this
‘Apple’, ‘Orange’, ‘Strawberry’, ‘Banana’, ‘Kiwi’
Apple
Orange
Strawberry
Banana
Kiwi
for above example follow these steps:
1. replace \n by ‘
2. replace \r by ‘
3. replace ” by ‘,’
4. give final single quote in first letter and last letter
Thank you very much, this helped me a lot!
Thank you very much, this also helped me a lot!
Thank you very much, this helped me a lot!
Thank you Thomas
this method does not work fo me. I have Notepad++ v8.1.9.2 (32bit)