Using Notepad++, how would you automatically add a "," (comma) to the end of each row (REPLACE command)?

Posted on 2016-11-17
Last Modified: 2016-11-23
Using Notepad++, how would you automatically add a "," (comma) to the end of each row (REPLACE command)?

For example:


('05','512','S','PAR659','100512','Gainsville,  Fl','Rick',,1)
('06','612','S','PAR660','100512','Gainsville,  Fl','Fred',,2)


('05','512','S','PAR659','100512','Gainsville,  Fl','Rick',,1),  
('06','612','S','PAR660','100512','Gainsville,  Fl','Fred',,2),
Question by:zimmer9
LVL 49

Accepted Solution

Ryan Chong earned 250 total points
ID: 41892415
try this:
-SnapShot.pngand then click the Replace All button.
LVL 33

Assisted Solution

sarabande earned 250 total points
ID: 41892594
alternatively, you may use the macro recorder.

set the text cursor at begin of list.
start recording.
use keyboard to move to end of line
use keyboard to insert ','
use keyboard to move to begin of line
use keyboard to move to next line below
stop recording
do playback until all lines are done.

LVL 27

Expert Comment

ID: 41899987
In the Replace dialog, select Extended as noted by Ryan.

In Find: box, find {\r\n} in order to locate CarriageReturn\NewLine sequences. For Replace, specify {,\r\n}. (Without the braces in both cases.)

You might test by simply clicking 'Find' a few times to verify that the end-of-line is always being found.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Safearray problem c++ 4 80
Java eclipse error 2 66
How to jump to matching brace in eclipse editor ? 1 263
eclipse package explorer vs project explorer view 2 72
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now