Solved

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

Posted on 2016-11-17
3
89 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 51

Accepted Solution

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

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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…
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

726 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