2

I want to search and replace multiple words at once.

I know there's a software for this but the additional thing that I want is for example: I want to replace "add" with "include" then replace "include" with "add" but I don't want the first replaced word to change with the second replacement.

I know it's crazy but is there a software or anything that I can do that with?

I have already tried Office-word Search and replace software and it can't do what I want.

2
  • 2
    For Windows? In which files are these words?
    – unor
    Commented Jul 25, 2015 at 16:37
  • 4
    Without "special software", that should be achievable with 3 steps: 1) replace "add" with e.g. "§§§tmp§§§" (or any other term not being used elsewhere), 2) replace "include" with "add", 3) replace "§§§tmp§§§" with "include". Done.
    – Izzy
    Commented Jul 25, 2015 at 17:42

1 Answer 1

2

Two ways (that I know of) to accomplish this,

  1. (Provided by @Izzy)

    1. Replace "add" with "$#$one$#$"
    2. Replace "include" with "add"
    3. Replace "$#$one$#$" with "include"
  2. (Provided by SuperUser) -Requires Notepad++

    1. Search -> Replace
    2. Find what: (add)|(include)
    3. Replace with: (?1include)(?2add)
    4. Click "Replace All"

Before text

Step 1

Step 2 through 4

After text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.