diff --git a/dist/tools/bmp/bmp.py b/dist/tools/bmp/bmp.py index 81dce765d6..cb3013cf23 100755 --- a/dist/tools/bmp/bmp.py +++ b/dist/tools/bmp/bmp.py @@ -85,7 +85,7 @@ def detect_targets(gdbmi, res): while True: for msg in res: if msg['type'] == 'target': - m = re.fullmatch(pattern=r"\s*(\d)+\s*(.*)\\n", string=msg['payload']) + m = re.fullmatch(pattern=r"\s*(\d+)\s*(.*)\s*", string=msg['payload']) if m: targets.append(m.group(2)) elif msg['type'] == 'result':