What are the restrictions on the text blocks you want to replace? What kind of input format (raw .txt files, XML, ...) , what are the precise criteria of the text you want to replace, etc.
Probably some unicode-aware regular-expression text replacer can do the job.