Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1209.Advanced search and replace -- How to add number at end according to domain name at the begin of line?

User: basikabo -- 2014-06-28          << 1208  1210 >>
Hits: 979
Type: Advanced search and replace   
Search all Advanced search and replace examples
How to add different number at end according to domain name at the begin of line?

1.Extract mapping of domain names and Numbers from a.txt
2.Find the document containing the domain name
3.For the line start with a domain, add the related number at the end
Input Sample:
a.txt content:

get mapping: => 8 => 6
Some text file:|asdkfjl||aldksfjlj||asdkfjl|


Output Sample:
Add numbers at the end of line:|asdkfjl|6|aldksfjlj||asdkfjl|8

Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open a.txt
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to 'Line'
* set 'search for pattern' to

* click 'advanced' tab
* set 'run following at the beginning of replace' to:

* set 'run following for each matched unit' to:

3. click 'replace', and domainname/number mapping has been created in dictionary. Do not save file.

4. ctrl-h open 'replace' dialogue again
* set 'replace unit' to 'Line'
* set 'search for pattern' to:

* set 'replace with pattern' to:

5. click 'batch ...' button open 'batch runner' window
6. drag multiple files to 'batch runner' window
7. click 'batch replace', done.

Note: please make backup in advance to avoid mis-operation.

Screenshot 1:  Replace_Window

Screenshot 2:  Replace_Advanced_Window

Screenshot 3:  Replace_Window

Similar Examples:
How to add a number in each line indicating number of words in this line? (59%)
How to insert a word or phrase to the begining of each line? (57%)
How to change the number to the corresponding letter base on mapping table? (56%)
How to add a line number at the beginning of each line? (56%)
How to move a string from the end of the line to the beginning of the line? (55%)
How to count the number of records for each month in a web log file? (54%)
How to sort the text file by the date at the beginning of each line? (54%)
How to sort the numbers in each line by the descending order in a text file? (53%)

Check Demo of Advanced search and replace
dictionary  diction  mapping  document  backup  doc  dic  var  create  different number  add a number to multiple file names  add beginning and end file  batch file number operation  files dictionary  batch add a number to each line  different names  operation 7  search replace mapping