Trim, then replace