mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-14 14:49:21 +01:00
Fix perlReToReplacer when \ is used in the replacement
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
e00e161a73
commit
58d308b54d
@ -166,8 +166,8 @@ def perlReToReplacer(s):
|
||||
"""
|
||||
sep = _getSep(s)
|
||||
escaped = re.escape(sep)
|
||||
matcher = re.compile(r's%s((?:\\.|[^\\])*)%s((?:\\%s|[^\\])*)%s(.*)'
|
||||
% (escaped, escaped, escaped, escaped))
|
||||
matcher = re.compile(r's%s((?:\\.|[^\\])*)%s((?:\\.|[^\\])*)%s(.*)'
|
||||
% (escaped, escaped, escaped))
|
||||
try:
|
||||
(regexp, replace, flags) = matcher.match(s).groups()
|
||||
except AttributeError: # Unpack list of wrong size.
|
||||
|
Loading…
Reference in New Issue
Block a user