Improve rename-target regex

This commit is contained in:
Andrew Hyatt 2018-05-22 23:24:07 -04:00
parent 128db97f82
commit ac94c1365c
No known key found for this signature in database
GPG Key ID: 5456D0F696719C24

View File

@ -19,7 +19,7 @@ def editfile(f, old, new):
f.seek(0)
contents = re.sub(old, new, contents)
contents = re.sub("([^\w])" + old + "([^\w])", r"\1" + new + r"\2", contents)
f.write(contents)