Page 1 of 1

Find and Replace?

Posted: Wed Feb 21, 2007 9:08 pm
by DMotel
I have a Blog that is filled with Q and A's I want to change "Q" and "A" to "Question" and "Answer" throughout all of the entries. Is that possible?
Thanks

Re: Find and Replace?

Posted: Thu Feb 22, 2007 10:26 am
by garvinhicking
Hi!
DMotel wrote:I have a Blog that is filled with Q and A's I want to change "Q" and "A" to "Question" and "Answer" throughout all of the entries. Is that possible?
Thanks
This could best be done by exporting a SQL dump and doing search+replace there, then re-uploading the dump.

Doing automatic replacement within the entries is dangerous. You could replace " Q " with "Question" and " A " with "Answer", but then you need the spaces before and after that everywhere. If you just replace "Q" with "Question" you would get "Queue" replaced to "Questionueu". :)

Best regards,
Garvin

Posted: Mon Feb 26, 2007 11:37 pm
by DMotel
Can I export the sql through serendipity admin?
Also I am going to be changing "Q :" and "A :" so the colon should help solve the problem about replacing too much right?

Posted: Tue Feb 27, 2007 10:46 am
by d_cee
Hi

you'll need to use phpMyAdmin or similar to export the sql dump.

And yes, if you search for 'Q :' you should avoid changing any 'q's' that you don't want to replace.

HTH

Dave