Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

793.Advanced search and replace -- How to replace each xxx with the first word in the same line in text file?

User: editor -- 2011-06-02          << 792  794 >>
Hits: 1996
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to replace each xxx with the first word in the same line in text file?
Input Sample:
003 id1=xxx name1=user_xxx
008 id2=xxx name2=user_xxx
026 id5=xxx name5=user_xxx
138 id8=xxx name8=user_xxx
142 id10=xxx name10=user_xxx
Output Sample:
003 id1=003 name1=user_003
008 id2=008 name2=user_008
026 id5=026 name5=user_026
138 id8=138 name8=user_138
142 id10=142 name10=user_142
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to "Line"
* set 'search for pattern' to:

* set 'replace with pattern' to:

3. click 'replace', done!
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to delete the first word in each line in a text file? (77%)
How to replace the content of XML with a list of words from text file? (69%)
How to replace the all word "test" with the first word in same line? (68%)
How to replace some text with a random line from another file? (66%)
How to replace a word only one time in multiple text files? (66%)
How to remove the first 10 characters of each line in text file? (64%)
How to replace a words with the previous word in the same column? (63%)
How to reverse the order of the first column in text file? (63%)

Check Demo of Advanced search and replace
Keywords:
xxx  same  first word  the first  first  rst  word  save  each  source  replace same word  replace the same word  pattern first word  search same file  same file  replace text first line  search and replace first  first replace line