How can I use replace in Notepad++ using Regular expressions?
-
I have a list of over 500 alpha numeric combinations. I can use find to to find the items 5 characters in length by searching for ".*.*.*.*.*" (exclude quotations). However, I want to do a find and replace where I can keep the original alpha numeric combo and add 5 char after it. In example: 13H45 1298R 487RF Search for and replace would yield: 13H45 5 char 1298R 5 char 487RF 5 char Solution?
-
Answer:
I don't see a replacement string option in Notepad++. I did get this to work with the online application RegExHero The regex expression: ^[A-Za-z0-9]{5}$ The replacement string: $& 5 char The test string: 32X3 13H45 1298R 487RF 1298RW 487RFW The results: 32X3 13H45 5 char 1298R 5 char 487RF 5 char 1298RW
ResourceGuy at Yahoo! Answers Visit the source
Other answers
You can find using this regex ^(\w\w\w\w\w)$ Which would capture the word charactors [A-Za-z0-9_] If you only want alphanumeric you can do ^([A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Z... then replace with \1 5 char
Dao
I don't see a replacement string option in Notepad++. I did get this to work with the online application RegExHero The regex expression: ^[A-Za-z0-9]{5}$ The replacement string: $& 5 char The test string: 32X3 13H45 1298R 487RF 1298RW 487RFW The results: 32X3 13H45 5 char 1298R 5 char 487RF 5 char 1298RW
Related Q & A:
- How can I trick SSH to connect using different configurations based on current location?Best solution by Server Fault
- How can I install node.js module using phantom, instead of npm?Best solution by Stack Overflow
- How can I analyze my simple project using sonar?Best solution by Stack Overflow
- how can I listen for database changes using java?Best solution by Stack Overflow
- How can I type in Korean on a regular keyboard?Best solution by ipa.typeit.org
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.