Replacement Problem

juha7p9

Newbie
Joined
Oct 19, 2021
Messages
20
Reaction score
4
I didn't find a suitable category for this post.

Is there any way or program to solve this kind of replacement. I have the text file which contains:

<a>word1</a><b>---</b>

<a>word2</a><b>---</b>

<a>word3</a><b>---</b>

etc... and lot of other text

I want to replace first --- with word1, second --- with word2, etc

Those words can be any kind of words like flower, people, beer... but brackets are the same.

Is it possible to make all replacements AT ONCE? And how?

The program like PowerGREP maybe could do this but I don't know how.

Thanks if you can help.
 
Sounds simple enough where are the words which are going to be used as replacements comming from?
 
If you need to do it manually, you can do it with VS code.
- Mark the word that you want to copy.
- ctrl+D (cmd+D on mac) to select all occurrences of this word.
- ctrl+C (cmd+C on mac)to copy.
- move with the keyboard arrow to the start of the --- that you want to replace.
- hold shift key and move right with the arrow key to mark the ---
- ctrl+V (cmd+V on mac)

This should do the job if I understood what you are trying to do.
Hope this helps.
 
Back
Top