diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-02-09 18:00:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 18:00:49 (GMT) |
commit | 2411292ba8155327125d8a1da8a4c9fa003d5909 (patch) | |
tree | 7e5ca5d6b4151fc38ddf4324d67edbc4be630499 /Lib/csv.py | |
parent | bfe4fd5f2e96e72eecb5b8a0c7df0ac1689f3b7e (diff) | |
download | cpython-2411292ba8155327125d8a1da8a4c9fa003d5909.zip cpython-2411292ba8155327125d8a1da8a4c9fa003d5909.tar.gz cpython-2411292ba8155327125d8a1da8a4c9fa003d5909.tar.bz2 |
bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601)
Co-authored-by: Jake Davis <jcdavis@awedge.net>
Diffstat (limited to 'Lib/csv.py')
-rw-r--r-- | Lib/csv.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -217,7 +217,7 @@ class Sniffer: matches = [] for restr in (r'(?P<delim>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?P=delim)', # ,".*?", r'(?:^|\n)(?P<quote>["\']).*?(?P=quote)(?P<delim>[^\w\n"\'])(?P<space> ?)', # ".*?", - r'(?P<delim>>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?:$|\n)', # ,".*?" + r'(?P<delim>[^\w\n"\'])(?P<space> ?)(?P<quote>["\']).*?(?P=quote)(?:$|\n)', # ,".*?" r'(?:^|\n)(?P<quote>["\']).*?(?P=quote)(?:$|\n)'): # ".*?" (no delim, no space) regexp = re.compile(restr, re.DOTALL | re.MULTILINE) matches = regexp.findall(data) |