Lines 3537-3546
Link Here
|
3537 |
if not mycontent.count(old_value): |
3537 |
if not mycontent.count(old_value): |
3538 |
continue |
3538 |
continue |
3539 |
old_value = re.escape(old_value); |
3539 |
old_value = re.escape(old_value); |
3540 |
mycontent = re.sub(old_value+"$", new_value, mycontent) |
3540 |
mycontent = re.sub(old_value+"(\\s)", new_value+"\\1", mycontent) |
3541 |
mycontent = re.sub(old_value+"(\s)", new_value+"\1", mycontent) |
3541 |
mycontent = re.sub(old_value+"(-[^a-zA-Z])", new_value+"\\1", mycontent) |
3542 |
mycontent = re.sub(old_value+"(-[^a-zA-Z])", new_value+"\1", mycontent) |
3542 |
mycontent = re.sub(old_value+"([^a-zA-Z0-9-])", new_value+"\\1", mycontent) |
3543 |
mycontent = re.sub(old_value+"([^a-zA-Z0-9-])", new_value+"\1", mycontent) |
|
|
3544 |
f = open(dbdir+"/"+myfile, "w") |
3543 |
f = open(dbdir+"/"+myfile, "w") |
3545 |
f.write(mycontent) |
3544 |
f.write(mycontent) |
3546 |
f.close() |
3545 |
f.close() |