From 43f86a6c29367cbd2184da510ecf8ec1692e6d94 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Tue, 20 Feb 2024 17:17:44 +0100 Subject: [PATCH] handle mixed space and tabs --- src/nmreval/io/asciireader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nmreval/io/asciireader.py b/src/nmreval/io/asciireader.py index 05f84a5..6a31318 100644 --- a/src/nmreval/io/asciireader.py +++ b/src/nmreval/io/asciireader.py @@ -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: