[javascript] Javascript replace with reference to matched group?