| Xqt changed the task status from "Open" to "Stalled". Xqt added a comment. |
Works for me:
>>> import pwb, pywikibot as py
>>> from pywikibot import textlib
>>> import re
>>> site = py.Site()
>>> pattern = textlib.FILE_LINK_REGEX % '|'.join(site.namespaces[6])
>>> regex = re.compile(pattern, re.VERBOSE)
>>> text = 'This [[File:ABC.jpg|123px|text [[Lorem ipsum]] text]] bar'
>>> regex.sub('foo', text)
'This foo bar'
>>>Could you please add the result of version.py here and point the page you where processing at last.
TASK DETAIL
EMAIL PREFERENCES
To: Xqt
Cc: Xqt, jayvdb, Aklapper, matej_suchanek, pywikibot-bugs-list, MayS, Mdupont, JJMC89, Alchimista, Rxy
Cc: Xqt, jayvdb, Aklapper, matej_suchanek, pywikibot-bugs-list, MayS, Mdupont, JJMC89, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
