Add tag replace function.