Replace text with the contents of a register.