Revision: 4349
Author: wikipedian
Date: 2007-09-24 08:32:30 +0000 (Mon, 24 Sep 2007)
Log Message:
-----------
added 'link' regex to replaceExcept() to fulfil feature request [
1775389 ] restriction for replace.py by annabel
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2007-09-24 08:26:13 UTC (rev 4348)
+++ trunk/pywikipedia/wikipedia.py 2007-09-24 08:32:30 UTC (rev 4349)
@@ -2618,6 +2618,9 @@
'template': re.compile(r'(?s){{(({{(({{.*?}})|.)*}})|.)*}}'),
'hyperlink': weblinkchecker.compileLinkR(),
'gallery':
re.compile(r'(?is)<gallery.*?>.*?</gallery>'),
+ # this matches internal wikilinks, but also interwiki, categories, and
+ # images.
+ 'link':
re.compile(r'\[\[(?P<title>[^\]\|]*)(\|[^\]]*)?\]\]')
}
# if we got a string, compile it as a regular expression
Show replies by date