From ead18d8035f04f38ae7e17384da491b983bba45e Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Thu, 23 Jan 2025 17:47:20 +0100 Subject: [PATCH] check for brace after commas --- 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 6a31318..da5ffd7 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, ;]+(?!\w*})', ';', line) line = line.split(';') try: