Use replace in directive