From 8bcc83cd9fb5cca758baef6d8324151c84d9384e Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 31 May 2022 11:32:51 +0200 Subject: Small improvement to regex --- lab_control/sds1000xe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lab_control') diff --git a/lab_control/sds1000xe.py b/lab_control/sds1000xe.py index 551c9ef..859b1bf 100644 --- a/lab_control/sds1000xe.py +++ b/lab_control/sds1000xe.py @@ -21,7 +21,7 @@ class SDS1000XE(Oscilloscope): try: # TODO add code to regex response = self._socket.recv(4096).decode() - m = re.search(r"C(?P\d):PAVA .+,(?P[0-9.E+-]+)\w+", response) + m = re.search(r"C(?P\d):PAVA .+,(?P[\d.E+-]+)\w+", response) measurement = float(m.group("rawMeasurement")) except TimeoutError as e: measurement = None -- cgit v1.2.3