Solved

Notepad++ wildcard replace

Posted on 2013-06-27
5
6,130 Views
Last Modified: 2013-06-29
I have over 1000 reference markers all starting with ak.  they are all ak with 4 numbers, for example ak3001, ak3002, and so on.  I simply need to search for all ak**** "wildcards" and enclose them in parentheses. ak3001 = (ak3001)
0
Comment
Question by:jdclaw
  • 3
5 Comments
 
LVL 10

Accepted Solution

by:
rjanowsky earned 500 total points
ID: 39283519
Try this one:

Find pattern: (ak....) - Replace pattern: \(\1\)
0
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39283578
Search: (ak\d\d\d\d)
Replace: (\1)
0
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39283579
You don't need '\ before the '(' in the replacement string.
0
 

Author Closing Comment

by:jdclaw
ID: 39286106
worked perfectly!
0
 
LVL 54

Expert Comment

by:Julian Hansen
ID: 39286323
Except your question specifically stated that you want to find ak followed by 4 numbers
They are all ak with 4 numbers,
The accepted solution will match any 6 character string with prefix ak i.e.

akabcd
ak!@#%
ak    (followed by 4 spaces)

Maybe it works for you but in the context of others reading this thread it is the wrong answer.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

This algorithm (in C#) will resize any image down to a given size while maintaining the original aspect ratio. The maximum width and max height are both optional but if neither are given, the original image is returned. This example is designed t…
Article by: Nadia
Linear search (searching each index in an array one by one) works almost everywhere but it is not optimal in many cases. Let's assume, we have a book which has 42949672960 pages. We also have a table of contents. Now we want to read the content on p…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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