thx PS i also cant figure out what is wrong here ? rex=re.compile('^"(?P<value>[^"]*)"$',re.M) for v in l: v=rex.match(v).group('value') v=v.replace('""','"') return(l) v=rex.match(v).group('value') AttributeError: 'NoneType' object has no attribute 'group'