Page 1 of 1

major surgery on html files

Posted: Sun Jul 06, 2008 1:24 am
by ^OO^
Hello coders, all :-)

Over the years, I have created many news and blog files. Now and then I changed header styles including inline css blocks with varying presentation styles. I have also introduced menu bars (I manage other sites). Some are mapped jpg files and some are just html script. Anyway, it's time to pull it all together and unify the style.

So. I want to decapitate all these files down to the first <h1> tag.
This could mean removing 50 lines of offensive code, replacing it with sweet, clear code of maybe five lines.

Can WildEdit do this for thousands of html files in hundreds date-named sub-folders, all in a folder called 'files' ?

I think it's a tall order. A challenge. Doing it all by hand is a sickening prospect. So much so that I might never get around to it.

Can WildEdit do it all in one fell stroke?

Posted: Mon Jul 07, 2008 8:32 pm
by talleyrand
One fell stroke would probably depend on your regular expression prowess.

Posted: Mon Jul 07, 2008 9:53 pm
by ben_josephs
Find what:
.*<h1>

Replace with:
... New stuff ...
<h1>


[X] Regular expression
[X] Search subfolders

Options
[ ] '.' does not match a newline character [i.e., not selected]