diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-05-31 11:32:51 +0200 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-05-31 11:32:51 +0200 |
commit | 8bcc83cd9fb5cca758baef6d8324151c84d9384e (patch) | |
tree | 362d16d7922498e59bdb2b266e27976d6163b71d /lab_control | |
parent | bff307e33bd1eb6e39d5edc76ce8f4434aba484d (diff) |
Small improvement to regex
Diffstat (limited to 'lab_control')
-rw-r--r-- | lab_control/sds1000xe.py | 2 |
1 files changed, 1 insertions, 1 deletions
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<responseChannel>\d):PAVA .+,(?P<rawMeasurement>[0-9.E+-]+)\w+", response) + m = re.search(r"C(?P<responseChannel>\d):PAVA .+,(?P<rawMeasurement>[\d.E+-]+)\w+", response) measurement = float(m.group("rawMeasurement")) except TimeoutError as e: measurement = None |