• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Anyone know of a powerful text file search/replace program?

igowerf

Diamond Member
I'm looking for a program that can scan through text files (html files mostly) and search for certain blocks of text and replace them. I need something with wildcard character support. I'm trying to use the one in dreamweaver but it can't seem to do what I need.


Example:
Let's say I have about 50 html files. They're all the same except for the banner/header at the top. The file name for the banner is unique for each page and has no pattern:


<a href="http://www.chumby.net"><img src="aewraf.jpg"></a>
<a href="http://www.chumby.net"><img src="rtwe5v45.jpg"></a>
<a href="http://www.chumby.net"><img src="asdfwdfdsaf.jpg"></a>


I want to be able to search for something like:
<a href="http://www.chumby.net"><img src="*.jpg"></a>
and replace it.

Thanks in advance.
 
texpad has some awesome regexp capabilities...its hard to search for a paragraph of text through....
I've had to do exactly waht your talking about though on multiple occasions (do online classes where each class has to have a banner on every page)...the best things usually ends up being to go through each page and take out the code and replace it with a dreamweaver library item...and that way while in the page can take out all the old code and reformat to your liking...
 
Originally posted by: BingBongWongFooey
grep, sed, awk

perl

python

<insert language here>

Is grep a command line utility? I need to search for large paragraphs too and I was hoping for something with a pretty GUI. 🙂
 
Originally posted by: igowerf
Originally posted by: BingBongWongFooey
grep, sed, awk

perl

python

<insert language here>

Is grep a command line utility? I need to search for large paragraphs too and I was hoping for something with a pretty GUI. 🙂

Yeah, it is. Are you doing this on windows or *nix?
 
Originally posted by: Drakkon
texpad has some awesome regexp capabilities...its hard to search for a paragraph of text through....
I've had to do exactly waht your talking about though on multiple occasions (do online classes where each class has to have a banner on every page)...the best things usually ends up being to go through each page and take out the code and replace it with a dreamweaver library item...and that way while in the page can take out all the old code and reformat to your liking...

Thanks for the tip, but this project is actually for my work and I'll probably never touch these files again after I'm done. However, once I finish with these current files, I might get more. I've had other projects where I've needed such a program too.
 
In Dreamweaver:

go to "Find and Replace".

In the "Search For" box, select "source code".

At the bottom of the window, check the "Use Regular Expressions" box.

Search for this:
<a href="http://www\.chumby\.net"><img src="([^.]*)\.jpg"></a>

Replace it with whatever you want.

 
Back
Top