Want a replacemet script
Posted: Mon May 22, 2006 4:40 am
Hi I'm quite new to this newLISP thing, but I was thinking mabe make a good replacement script/program, someone maybe alredy done one?
This is what I want:
Arguments:
Start string, End String, Replace string/textfile, file_list_to_replace_in
Description:
Replaces everyting betwean Start string and End string with the text from the replace string/textfile in all files from the file list and on all places in those files.
Some kind of example:
Replaces everyting betwean all <div class="thing" id="start"> and <!-- end of start --> with the text from the start.txt in index.html,page1.html and page3.html.
Mabe make an option with a target file were a new file is created instead of changing the first one... this sounds easier.
All ideeas are wery appreciateed
This is what I want:
Arguments:
Start string, End String, Replace string/textfile, file_list_to_replace_in
Description:
Replaces everyting betwean Start string and End string with the text from the replace string/textfile in all files from the file list and on all places in those files.
Some kind of example:
Code: Select all
(replace-strings '<div class="thing" id="start">' '<!-- end of start -->' 'start.txt' ('index.html' 'page1.html' 'page3.html'))
Mabe make an option with a target file were a new file is created instead of changing the first one... this sounds easier.
All ideeas are wery appreciateed