major surgery on html files

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
^OO^
Posts: 22
Joined: Tue Apr 29, 2003 9:07 pm
Location: Bedford, England
Contact:

major surgery on html files

Post 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?
Windows 7
TextPad 7
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

One fell stroke would probably depend on your regular expression prowess.
I choose to fight with a sack of angry cats.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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]
Post Reply