
poly4life
Novice
Mar 24, 2011, 9:39 AM
Post #1 of 2
(1279 views)
|
|
Need help creating a script that reads in multiple files for regex search..replace
|
Can't Post
|
|
Hello, I need some help writing a perl script which reads in a series of .htm files, all in the same directory, and executes a regex search..replace on each file. For the replacement, I want the text to be from another file. I am using Windows XP and Strawberry Perl, FYI. The text for the replace will come from this file:
File_For_Replace.txt Way too much text to print in this post, but it is html and will be cut and pasted from another file that I presumably must read in And the regex will be something like:
#pseudo-code s~<html><head></head><body>~Way too much text to print in this post, but it is html and will be cut and pasted from another file that I presumably must read in~ test.htm # loop through each htm file in a directory I would sincerely appreciate some help with this. Thank you.
|