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
Solved

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

Posted on 2016-11-17
3
81 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 51

Accepted Solution

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

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Title # Comments Views Activity
Object Data Source 4 133
eclipse error 7 105
easiest way to find port number 12 111
Java Help 2 86
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

860 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