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
74 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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
What is an NDK ? 3 103
Display current date,month,and year to JTextField 3 63
Visual Studio Debugging 3 153
Embarcadero C++ Builder XE10.1 Berlin red arrow Indicator 2 70
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ā€¦
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

762 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