|
|
|
|
![]() ![]() |
Mar 26 2007, 05:36 AM
Post
#1
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
The title says it all - am hunting for a freeware tool that'd allow me to search a BLOCK of text (as opposed to a line of text in most editors) across multiple files and replace it in all those files. Has anyone come across such a tool. I Googled and found a few paid ones and even gave a try to their trial versions - but all of them seemed buggy and ill-designed.
It'll be really great if someone can suggest such a tool. Regards, m^e |
|
|
|
Mar 26 2007, 09:47 AM
Post
#2
|
|
|
Nenad Bozidarevic Group: [MODERATOR] Posts: 1,002 Joined: 7-November 05 From: Belgrade, Serbia Member No.: 9,500 |
I haven't heard of such a program, but you could make it yourself. That way you would get exactly what you want and how you want it. I've even got an idea how to do it:
Might not be so fast, but will definitely do what you need. |
|
|
|
Mar 26 2007, 10:25 AM
Post
#3
|
|
|
Premium Member Group: [HOSTED] Posts: 372 Joined: 16-February 06 From: Kolkata, India Member No.: 11,322 |
I was on the job myself. It would be called Mr. Block Text
Progress so far:- > Add/Edit/Remove files to the list > Search Forward + Backward in multiple files > Replace / Replace All > Backup Files before Replace
This post has been edited by turbopowerdmaxsteel: Mar 26 2007, 11:50 AM |
|
|
|
Mar 26 2007, 11:53 AM
Post
#4
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
Pyost,
|
|
|
|
Mar 26 2007, 12:04 PM
Post
#5
|
|
|
Premium Member Group: [HOSTED] Posts: 372 Joined: 16-February 06 From: Kolkata, India Member No.: 11,322 |
Ok here goes the Work in Progress version.
http://ntek.astahost.com/wip/mrblocktext/ Hopefully, this would serve your purpose. Do mention the features you would like to be added/ripped off and any bugs that you encounter (I had to rush things 'cause of the classes). For now, the backups will be stored in the backup directory of the application with a timestamp prefix added to the filename. |
|
|
|
Mar 26 2007, 12:24 PM
Post
#6
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
Check it out and here are the problems:
Problems
Suggestions:
|
|
|
|
Mar 26 2007, 03:09 PM
Post
#7
|
|
|
Premium Member Group: [HOSTED] Posts: 393 Joined: 9-March 07 From: Tucson, AZ Member No.: 20,794 |
If you don't need a gui program, awk will do this for you. The syntax can be a little confusing, but if you read the manpage you should have no problem devising an awk statement that will do anything you like.
Also, a perl script could do this extremely easily in less than 20 lines of code. I forgot to mention, awk is both freeware AND open source. This post has been edited by ethergeek: Mar 26 2007, 03:09 PM |
|
|
|
Mar 26 2007, 04:06 PM
Post
#8
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
ethergeek: If it was for myself - I'd probably use awk. Would have been a much faster and smoother approach. But this is for someone else, who sadly has no clue how to work out of the Windows box. So there...
|
|
|
|
Mar 26 2007, 04:40 PM
Post
#9
|
|
|
Absolute Newbie Group: Admin Posts: 887 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 |
Well, I use CuteHTML for most of my editing needs and it includes a text replacement feature that I use a lot. It will search and replace text on the active document or all open documents.
It isn't very fancy and doen't use any regular expressions but with a little practice, you'll figure out how to overcome that. It will do large blocks of text as well. The demo version stops providing code tips and more advanced features but the find and replace feature works great. I use an older version - CuteHTML LE from 2001 You might give it a try, I'll look around and see if I still have the installer for it if you need. vujsa |
|
|
|
Mar 26 2007, 05:02 PM
Post
#10
|
|
|
Premium Member Group: [HOSTED] Posts: 393 Joined: 9-March 07 From: Tucson, AZ Member No.: 20,794 |
ethergeek: If it was for myself - I'd probably use awk. Would have been a much faster and smoother approach. But this is for someone else, who sadly has no clue how to work out of the Windows box. So there... Roger that...though you still might be able to incorporate awk as the replacement backend for the text search/replace instead of writing your own regexes and routines. You can abstract the operation but still maintain the power of awk |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 5th September 2008 - 12:22 PM |