Buy PSP - FHA Loan - Inmobiliarias Denia - Loans - Loans

PDA

View Full Version : Edit (Replace) on 400+ PHP Pages at once.


mmelen
Apr 27th 2008, 10:08 pm
I need to replace some code on 400+ PHP pages.
The code is multi-lined.
Is there any program that will do this for me?

And one more thing...
I need to replace something that's different on every page.

<param name="movie" value="XXXXXXXXX">
<embed src="XXXXXXXXXX" width="650" height="450">

The XXXXXXXXXX is different on each of my pages. (the .swf URL hard coded in).
I figure that I want the URL to be retrieved from the Mysql database instead of hard coded on right away....

But I can't really search for XXXXXXXXXX because it's different on every page... so I would need to search for (and replace) what's between embed src=" and width="650" height="450">

Can I do that??

SecureWebDev
Apr 27th 2008, 10:31 pm
how much you willing to pay?

pdsllc
Apr 27th 2008, 10:34 pm
if you have a macintosh, bbedit can do it
for XXXXXXXXXX just do a grep search and replace

pixens
Apr 27th 2008, 11:00 pm
there is a software can do that, buzz me if you still in the dark. Something called "search and replace", is a freeware, I am sure i got it trashed somewhere

mmelen
Apr 27th 2008, 11:20 pm
how much you willing to pay?

Well I was hoping to find a freeware that can do it... so I guess 0?

if you have a macintosh, bbedit can do it
for XXXXXXXXXX just do a grep search and replace

Hmm... Maybe I can get someone with a Mac that can help me?
I don't want XXXXXXXXXX to be searched though (it's different per page) I need to find it by getting the stuff around it.

there is a software can do that, buzz me if you still in the dark. Something called "search and replace", is a freeware, I am sure i got it trashed somewhere

Thanks a lot. If I still don't get an answer by tomorrow, I'll let you know.

thundercow
Oct 17th 2008, 9:07 am
This worked for me: RegEx Search/Replace Tool, which is available on Sourceforge. The java interface is a little weird, but it works on entire directories

ads2help
Oct 17th 2008, 9:49 am
a good text editor can do the search & replace job on a directory including its subdirectory

thundercow
Oct 17th 2008, 11:57 am
You know, Notepad++ has this functionality built right into the search/replace function, and I am thinking now that this is the better way to do this.