remove ref from string