Solved

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

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

For example:

BEFORE:

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

AFTER:

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

Accepted Solution

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

Assisted Solution

by:sarabande
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.

Sara
0
 
LVL 27

Expert Comment

by:tliotta
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.
1

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

743 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

13 Experts available now in Live!

Get 1:1 Help Now