diff --git a/src/common/helpers.py b/src/common/helpers.py index 7961cdfb30b3e02f4b02fbcafcea826e58988957..b37aad73eecaf386fe6d7e1862dfeb5a90a3e7cd 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -328,8 +328,8 @@ def from_one_line(msg): # to match the regexp that follows it # So here match '\\n' but not if you have a '\' before that - re = re.compile(r'(?<!\\)\\n') - msg = re.sub('\n', msg) + expr = re.compile(r'(?<!\\)\\n') + msg = expr.sub('\n', msg) msg = msg.replace('\\\\', '\\') # s12 = 'test\\ntest\\\\ntest' # s13 = re.sub('\n', s12)