Switch segments of text with predefined replacements