Editor Needed - Multi-line Search and Replace Capable

K

Kieran Seymour

Right, this isn't the usual request for a decent HTML editor as I'm
perfectly happy with HTML-Kit, but I do need a temporary addition to my
arsenal.

Basically, I need to do a global multi-line search and replace on
approximately 200 HTML files. Anyone got any suggestions for a free
Windows-based program that's capable of doing it?

And while I think about it, if anyone has any suggestions for something
capable of doing a global search and replace using wildcard expressions,
that might get out of another hole!

TIA,
Kieran
____________________________________________________
The UK Sci-Fi TV Book Guide
http://homepage.ntlworld.com/john.seymour1/ukbookguide/
A comprehensive guide to 50 years of novelisations and script
books from the UK and US.
 
S

Spartanicus

Kieran Seymour said:
Basically, I need to do a global multi-line search and replace on
approximately 200 HTML files. Anyone got any suggestions for a free
Windows-based program that's capable of doing it?

Editors with a proper multi line S&R are rare, Homesite has a good multi
line S&R (not free), Eversoft's 1st Page 2000 is a free editor modeled
after Homesite, but I can't remember if it has multi line S&R.
And while I think about it, if anyone has any suggestions for something
capable of doing a global search and replace using wildcard expressions,
that might get out of another hole!

Most editors capable of S&R support regular expressions and/or using
scripting languages such as Perl.
 
L

Lauri Raittila

Right, this isn't the usual request for a decent HTML editor as I'm
perfectly happy with HTML-Kit, but I do need a temporary addition to my
arsenal.

Basically, I need to do a global multi-line search and replace on
approximately 200 HTML files. Anyone got any suggestions for a free
Windows-based program that's capable of doing it?

There is lots of programs to do that. Don't know any.
And while I think about it, if anyone has any suggestions for something
capable of doing a global search and replace using wildcard expressions,
that might get out of another hole!

emacs
RegExps (also multiline)
and findr package:
interactive replace in multible files (choosing files using regexp)

That is what I use when needing to fix only little BAD websites. (fully
BAD are easier to rebuild from scratch...)

And, it is not necessarily good idea to try to use emacs if you are
looking for temporary tool. OTOH, it has menu now, so it is not that hard
anymore...
 
K

Kieran Seymour

Spartanicus said:
a free Windows-based program that's capable of doing it?

Editors with a proper multi line S&R are rare, Homesite has a good
multi line S&R (not free), Eversoft's 1st Page 2000 is a free editor
modeled after Homesite, but I can't remember if it has multi line S&R.

I can't remember if it does a multi-line S&R either, but as it
definitely can't do it globally it's probably not worth losing sleep
over!

In actual fact the lack of global S&R in 1st Page was one of the main
reasons I switched over to HTML-Kit about two years ago - the
batch-action plugins have been exteremely useful until now. I'm just
being completely lazy and trying to avoid having to manually edit 200
files by hand!

Thanks for the suggestions though :)

Kieran
____________________________________________________
The UK Sci-Fi TV Book Guide
http://homepage.ntlworld.com/john.seymour1/ukbookguide/
A comprehensive guide to 50 years of novelisations and script
books from the UK and US.
 
K

Kieran Seymour

I think I've just found what I've been looking for.

I've been digging through the Usenet archives and discovered a
prehistoric program (c1999) call BK ReplaceEm v2.0. Only a 572k download
as well.

It's already dealt with the multi-line S&R issue, and it apparently
supports regular expressions as well - I'll be trying to solve that
particular problem in a few moments.

It's definitely one that's going to be added to my list of essential
utilities/tool!

Kieran
____________________________________________________
The UK Sci-Fi TV Book Guide
http://homepage.ntlworld.com/john.seymour1/ukbookguide/
A comprehensive guide to 50 years of novelisations and script
books from the UK and US.
 
K

Kim André Akerø

Kieran Seymour said:
Right, this isn't the usual request for a decent HTML editor as I'm
perfectly happy with HTML-Kit, but I do need a temporary addition to my
arsenal.

Basically, I need to do a global multi-line search and replace on
approximately 200 HTML files. Anyone got any suggestions for a free
Windows-based program that's capable of doing it?

As far as I know, EditPad Lite (the free version) is capable of such an
operation.
http://www.editpadlite.com/editpadlite.html

Just open all your files, click the Search button (the search/replace
functions are at the same location), enter the search text and the replace
text and remember to tick the "All open documents" option before clicking
the "Replace All" button.

And yes, it does handle multiple lines, but only if you copy+paste them into
the search and replace text boxes.

If you're replacing navigation HTML code, you might consider using includes
in the future.
http://www.allmyfaqs.com/faq.pl?Include_one_file_in_another
 
F

Full name

As far as I know, EditPad Lite (the free version) is capable of such an
operation.
http://www.editpadlite.com/editpadlite.html

Just open all your files, click the Search button (the search/replace
functions are at the same location), enter the search text and the replace
text and remember to tick the "All open documents" option before clicking
the "Replace All" button.

And yes, it does handle multiple lines, but only if you copy+paste them into
the search and replace text boxes.

If you're replacing navigation HTML code, you might consider using includes
in the future.
http://www.allmyfaqs.com/faq.pl?Include_one_file_in_another
In addition, if you'll ever be likely to come up against more than simple
text Find & Replace, I can't remember whether the Lite version of EditPad
does regular expressions, but the Pro version does (in fact, the author has
produced a stand-alone regex program, too).
HTH.
 
N

Nico Schuyt

I can't remember if it does a multi-line S&R either, but as it
definitely can't do it globally it's probably not worth losing sleep
over!
In actual fact the lack of global S&R in 1st Page was one of the main
reasons I switched over to HTML-Kit about two years ago - the
batch-action plugins have been exteremely useful until now. I'm just
being completely lazy and trying to avoid having to manually edit 200
files by hand!

Maybe you do something wrong. I *never* have to do such S&R's. Do you apply
include functions (PHP, SSI) for variable coding?
 
K

Kieran Seymour

Nico Schuyt said:
Maybe you do something wrong. I *never* have to do such S&R's.
Do you apply include functions (PHP, SSI) for variable coding?

No, and I'm not able to either - I'm using free webspace with my dial-up
account.

Basically, I've decided to re-use a section of my website that I built
about three years ago, but never actually uploaded.

So I need to change all the pages like this
http://homepage.ntlworld.com/john.seymour1/andyLane.html

into something like this.
http://homepage.ntlworld.com/john.seymour1/benAaronovitch.html

Ignore any CSS oddities, it's just a temporary stylesheet that I use for
testing.

The basic file structure for the site is still the same, but if you look
at the underlying HTML for the original design it's not a pretty sight!
All of the pages use the same layout, so it's just a matter of replacing
large blocks of HTML that use tables with something a little more
refined and easier to update.

Kieran
____________________________________________________
The UK Sci-Fi TV Book Guide
http://homepage.ntlworld.com/john.seymour1/ukbookguide/
A comprehensive guide to 50 years of novelisations and script
books from the UK and US.
 
B

Blinky the Shark

Kieran said:
Right, this isn't the usual request for a decent HTML editor as I'm
perfectly happy with HTML-Kit, but I do need a temporary addition to my
arsenal.
Basically, I need to do a global multi-line search and replace on
approximately 200 HTML files. Anyone got any suggestions for a free
Windows-based program that's capable of doing it?
And while I think about it, if anyone has any suggestions for something
capable of doing a global search and replace using wildcard expressions,
that might get out of another hole!

IIRC from my own usage, this will do all that you request:

http://www.inforapid.com/html/searchreplace.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top