What's the use of Deterministic Regular Expressions?

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

Was this solution helpful to you?

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

Just Added Q & A:

Find solution

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.