Utente:BimBot/Scripts: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
bugfix
Nessun oggetto della modifica
Riga 1:
Copiate gente, copiate! (<small>Che poi va a fuoco il computer...</small>) :-D
 
== <tt>sistemaredirect.py</tt> ==
Riga 48:
 
def sistema(text, oldtitle, newtitle):
regex = u'\[\[%s\|' % oldtitle
p = re.compile(regex, re.IGNORECASE)
nuovotesto = "[[%s|" % newtitle
newtext = re.sub(p, nuovotesto, text)
regex = u'\[\[%s\]\]' % oldtitle
return new
p = re.compile(regex, re.IGNORECASE)
nuovotesto = "[[%s|%s]]" % (newtitle, oldtitle)
text = re.sub(p, nuovotesto, text)
return newtext
 
if __name__=="__main__":