Reassigned index after re.replace for Chrome