Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to edit a file using Notepad++, in such a way that I can copy(replicate) a line containing a specific word with some minor changes --

Example -- if the file has --

lASER_BALL
COMET_BALL
...

I want to change it to

LASER_BALL
LASER_BALL_END
COMET_BALL
COMET_BALL_END
...

Im talking about a file with a huge number of entries. Any idead on how this can be done using Notepad++ ?

share|improve this question

migrated from stackoverflow.com Sep 13 '10 at 1:25

This question came from our site for professional and enthusiast programmers.

1  
voting to close - you could easily use Copy/Paste? –  t0mm13b Sep 13 '10 at 0:54

3 Answers 3

Ctrl + H for search and replace:

        alt text

Then, Select All Ctrl + A, then Ctrl + Shift + U.

share|improve this answer

This can be done with a regex find and replace

share|improve this answer
  1. Replace (Ctrl-H)

  2. Select "Regular expression" in "Search Mode"

  3. Find what: (.*)
    Replace with: \1\r\n\1_END

  4. Replace All (with In selection not ticked)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.