SedRegex: fix flag matching

From: db125ee5d1
This commit is contained in:
James Lu 2016-12-17 21:12:36 -08:00
parent c1c423cc0d
commit 889c6a1615
1 changed files with 1 additions and 1 deletions

View File

@ -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<nick>.+?)[:,] )?s(?P<delim>[^\w\s])(?P<pattern>.*?)(?P=delim)"
r"(?P<replacement>.*?)(?:(?P=delim)(?P<flags>[a-z]+))?$")
r"(?P<replacement>.*?)(?:(?P=delim)(?P<flags>[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'})