Briefly: I began to use new replace.py.
(I used the old compat one as long as I could with satisfaction, but at a point some sysop threw out all the logged in bots, and by that time the login had been crashed.)

Sometimes it works well, sometimes it keeps the first character of the article and throws away everything else. I cannot find the reason. For testing here is an example where it shows BOTH behaviours:

My fix is:
fixes['nemezetek'] = {
    'regex': True,
    'msg': {
        'hu':'Nemezetek → nemzetek tömeges javítása',
    },
    'replacements': [
        (r'(n|N)emezetek', r'\1emzetek'), # Ez az alap, amit a lajostalanításhoz kikommentezünk
    ]
}

My command in huwiki is:
python pwb.py -nolog replace -fix:nemezetek -search:nemezetek

And the same fix and same command sometimes works well, and in other arcticles shows the above mentioned silly behaviour.
What do I do wrong?
 I try to attach a small creenshot: two articles are correct, the 3rd one is totally bad.
kép.png

--
Bináris