in reply to
Re^3: RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3?
in thread RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3?
Greetings Ken, and thanks again!
Your example(s) both work exactly as you indicated they would.
Took me awhile to sort it all out. But I'm afraid I wasn't as clear, or as concise
as I could/should have been -- soory. :(
I had already performed a mas-rename on the files by cobbling a sh(1) script, with the
help of find(1), basename(1), cp(1), && rm(1) through a for loop.
This is what left me with the task of correcting the references to the files previous
names within the newly named files. This is where my request came in -- again, sorry for not better clarifying.
I tried to apply your logic to the task of reading the contents of the files
and applying it to their contents. But I guess I'm just not yet proficient enough in perl(1). :(
So I got anxious, and mostly conquered the abc100 - abc999.html's
via another sh(1) script
# fixem -- a simple stupid && inefficient shell script
for name in $(find . -type f -name '*.html' -maxdepth 1)
# sed(1) recognizing Extended RE(s)
sed -Ef fixem.sed <$name >temp.txt
mv temp.txt $name
rm -f temp.txt
While that shell script fixed most of the occurrences, it missed a few, and it
also didn't address abc1 - 99.html. So now I'm going to try and figure out how
to best attack/accomplish this same (il)logic in perl(1). :)
Any pointers/guidance/solutions still greatly
Thanks again for everyones' time, and consideration.
my $perl_version = "5.12.4";