Solved

Using Notepad++, how would I insert the character '(' as the first character for each row with values and the characters '),' as the last characters for each row with values?

Posted on 2016-11-17
4
83 Views
Last Modified: 2016-11-17
Using Notepad++, how would I insert the character '(' as the first character for each row with values and the characters '),' as the last characters for each row with values?

for example:

Before:

06,511,S,PAR658,100511,Miami Beach,Owen Parr,222 Arthur Godfrey Rd.,Miami, FL,331401,100006

After
(06,511,S,PAR658,100511,Miami Beach,Owen Parr,222 Arthur Godfrey Rd.,Miami, FL,331401,100006),
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
  • 2
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 500 total points
ID: 41891750
Hi zimmer9,

you can use Search and Replace using regular expressions, replacing ^(.+)$ with \(\1\) using Replace All encapsulates each none-empty line with ( and )

Hope that helps,

ZOPPO
0
 

Author Comment

by:zimmer9
ID: 41891800
Are you stating that I should go to:

Replace

Find what:   ^(.+)$
Replace with: \(\1\)
0
 

Author Comment

by:zimmer9
ID: 41891817
This does put opening and closing parenthesis on each line which is great.

Is it possible to put an opening and

[closing parenthesis followed by a comma] ?

Just thought I'd ask.
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 41892533
You can add the comma to the ReplaceWith:

Find what:   ^(.+)$
Replace with: \(\1\),
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

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…
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 keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

734 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