From 889c6a1615e1a83e931bc15bb7fb49cab7ecd7c9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 17 Dec 2016 21:12:36 -0800 Subject: [PATCH] SedRegex: fix flag matching From: https://github.com/jlu5/SupyPlugins/commit/db125ee5d18259427b279ba352691155faec6328 --- plugins/SedRegex/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SedRegex/plugin.py b/plugins/SedRegex/plugin.py index 048f847e8..961127793 100644 --- a/plugins/SedRegex/plugin.py +++ b/plugins/SedRegex/plugin.py @@ -49,7 +49,7 @@ except ImportError: # lower than 2.7.6: see https://stackoverflow.com/questions/3675144/regex-error-nothing-to-repeat # and https://bugs.python.org/issue18647 SED_REGEX = re.compile(r"^(?:(?P.+?)[:,] )?s(?P[^\w\s])(?P.*?)(?P=delim)" - r"(?P.*?)(?:(?P=delim)(?P[a-z]+))?$") + r"(?P.*?)(?:(?P=delim)(?P[a-z]*))?$") # Replace newlines and friends with things like literal "\n" (backslash and "n") axe_spaces = utils.str.MultipleReplacer({'\n': '\\n', '\t': '\\t', '\r': '\\r'})