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
regex = u'\[\[%s\]\]' % oldtitle
return new▼
p = re.compile(regex, re.IGNORECASE)
nuovotesto = "[[%s|%s]]" % (newtitle, oldtitle)
text = re.sub(p, nuovotesto, text)
if __name__=="__main__":
|