Replace text with variable names