In search of a freeware editor capable of making batch edits to HTML files

Jeff7

Lifer
Jan 4, 2001
41,596
19
81
Ok, so my HTML files all have alt= tags, but I also want identical title= tags. So I need a batch editor that can find alt="*" and add title="*" behind it, and continue to do this throughout the file. Is this something that would be better suited for a small C++ program to do? This kind of operation sounds like C++ could do it....but I really don't remember much C++. It's been years.:eek:

So that's why I ask if there's a batch editor with such capability.
 

o2brew

Member
Feb 26, 2004
118
0
0
I looked a few days ago and couldn't find anything either. I have a bunch of html files that I want to batch replace *.bmp with *.jpg so I can use smaller image files.
 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
sed

it's a unix command
but I'm sure there's a freeware version for windows

or, you could download "unix services for windows" from MS and get a whole bunch of unix-like commands, including sed, or awk, or probably a dozen others.

a simple search/replace would go something like: sed -e 's/bmp/jpg/g' whatever.html
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
I use an editor called NotePad++. It supports regex search and replace on multiple files.
 

sunase

Senior member
Nov 28, 2002
551
0
0
TextPad can do it as well. It has a neat sequence syntax too. So in addition to deriving the replacement from something static or from saved groups in the search expression, you can also use sequential numbers which has come in handy at times.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Anything with a half decent regex implementation can do this for you. Textpad (in my experience) would probably be sufficient but any number of editors could do it. Sed, probably, but I'd go with perl if I was hacking it up myself (only because I know some perl and no sed).
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
VI if you just have a few files
perl, if you want 100 different (and equally capable) ways of doing it. I have yet to find a text parser better then perl. Shell+Sed+Awk aside....:)