Fix android issues with re.sub()