Regex Replace Function In Javascript Programming Test