I'm using the latest OSX and can edit the HTML files with CotEditor and KompoZer. I am however unexperienced with HTML editors in general :/
If I have to - because one of your answers is super simple and convenient that way - I could switch to a Win7 machine for this task.
I have a little over 700 HTML files at hand here that share the same basic structure, they are organized in many tables and I need to delete certain content from all of them, which consists of always the same rows with Titles and below columns with altering content. -- If I could specify something like "delete the whole column that contains e.g. "Name" in the top cell", that would do. Also, I need to delete recurring parts (which in theory can be found & replaced for all files... but, well, in batch somehow)
Can you help me out? Will KompoZer do the batch-trick or do you have another recommendation? Thanks :)
I tried TextWrangler for it's batch find & replace capabilities, and it works very well with finding recurring code across many files, so I know how I'll get the exact same bits out of every file. That leaves me with the altering content.
Is there a way to find content between two recurring points?
For example if I knew something before and after the content I wish to delete is always the same:
<tag> txt_a Content1_to_delete txt_b </tag> <tag> txt_a Content2_to_delete txt_b </tag> <tag> txt_a Content3_to_delete txt_b </tag>
so I'd need like find & replace between
<tag> txt_a and
or even find & replace starting at
<tag> txt_a up to and including
this is the troublesome bit for me where I really need assistance
After Gombai Sándor's answer in combination with Dooley_labs' comment I got some ideas, and while the sed variant will work from the terminal, I chose TextWrangler to do the work.
TextWrangler can do Find & Replace across multiple files, but will also accept regular expressions via a "grep" option. I learned about regular expressions and was able to resolve my issue. The "magical" bit for me was getting the wildcards right. Especially the simple
.*. To anyone who'd like to mess around with regular expressions I recommend this site, which I found very useful: