javascript replace all without replaceall