diff --git a/mssqlcli/packages/special/commands.py b/mssqlcli/packages/special/commands.py index d2112427..f89eb3e9 100644 --- a/mssqlcli/packages/special/commands.py +++ b/mssqlcli/packages/special/commands.py @@ -314,7 +314,7 @@ def get_editor_query(sql): # The reason we can't simply do .strip('\e') is that it strips characters, # not a substring. So it'll strip "e" in the end of the sql also! # Ex: "select * from style\e" -> "select * from styl". - pattern = re.compile(r'(^\\\e|\\\e$)') + pattern = re.compile(r'(^\\e|\\e$)') while pattern.search(sql): sql = pattern.sub('', sql)