Find and Replace?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
DMotel
Regular
Posts: 67
Joined: Fri Apr 21, 2006 8:49 pm

Find and Replace?

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Find and Replace?

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
DMotel
Regular
Posts: 67
Joined: Fri Apr 21, 2006 8:49 pm

Post 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?
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post 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
Post Reply