Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

563.Advanced search and replace -- How to update many htmls by adding some paragraphs at the specific position?

User: SilentHunter4 -- 2010-07-12          << 562  564 >>
Hits: 2888
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I always keep 100 html files in hand,and update a "seed" file day by day,after I update the seed, I need to copy the change to all 100 html files,these changes are the same,just add some paragraphs,but since these paragraphs are here and there in the seeds,I would like to know how to copy the changes at one time to all files. 
 
Input Sample:
Today, I add some paragraph to my seed file: 
 
<tr><td>I would like a cup of coffee.</td></tr> 




maybe after n lines, another added paragraph: 
<tr><td>I hate the hot wheather.</tr></td> 



and so on.
Output Sample:
I need these changes be transfered to all 100 html files,changes would be all the same, those added paragraphs are the same, the only problem is they are not at one place,but located in different positions in the seed file.
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
For example, if you need to add <span>...</span> after the second <p...</p>, 
and add <a href....</a> after the third <p...</p>: 
1. open "Tools->Batch Runner" menu 
2. drag all html files from "Windows File Browser" to "Batch Runner" window 
3. click "Fast Replace" button, click "Add" and fill following in "Find" entry: 
 
fill following in "Replace" entry: 
 
click "OK". 
4. make sure "regular expression" options are selected and click "start", all files will be replaced according to the regular expression you have entered here. 
 
Note: in "Fast Replace" regular expression, all the special symbol must be leaded by a backslash "\", for example, "</p>" will be "<\/p>"

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to rename files by adding specified strings at specified position? (66%)
How to change the number part of many filenames by adding some specified value? (56%)
How to validate many email addresses in a text file and export them? (53%)
How to add some number to the specific column in csv file? (51%)
How to add a space at the specific location of each line? (50%)
How to break down each line into 3 lines at specific position? (50%)
How to replace the 7th column with increasing numbers between the specified range? (49%)
How to extract lines with specific words in first column? (49%)

Check Demo of Advanced search and replace
Keywords:
span  paragraphs  third  position  href  a href  special  specific  day  backslash  search and replace for htmls  keep after  copy specific  copy many files  regular expression example replace how to  file copy one to many  how to copy one file to many  copy file one to many