handle mixed space and tabs

This commit is contained in:
Dominik Demuth 2024-02-20 17:17:44 +01:00
parent 25dc29b633
commit 43f86a6c29

View File

@ -49,7 +49,7 @@ class AsciiReader:
with self.fname.open('r') as f:
for i, line in enumerate(islice(f, len(self.header)+len(self.lines), num_lines)):
line = line.strip('\n\t\r, ')
line = re.sub(r'[\t ;,] *', ';', line)
line = re.sub(r'[\t ;,]+', ';', line)
line = line.split(';')
try: