http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9315
Revision: 9315
Author: multichill
Date: 2011-06-27 08:17:11 +0000 (Mon, 27 Jun 2011)
Log Message:
-----------
Regex fix so that the regex also works for Wiki's with non alfanumerical chars (like
nds-nl).
Modified Paths:
--------------
trunk/pywikipedia/imagerecat.py
Modified: trunk/pywikipedia/imagerecat.py
===================================================================
--- trunk/pywikipedia/imagerecat.py 2011-06-26 20:10:50 UTC (rev 9314)
+++ trunk/pywikipedia/imagerecat.py 2011-06-27 08:17:11 UTC (rev 9315)
@@ -251,7 +251,7 @@
project = ''
article = ''
usageRe = re.compile(
-
'^(?P<lang>([\w]+))\.(?P<project>([\w]+))\.org:(?P<articles>\s(.*))')
+
'^(?P<lang>([\w-]+))\.(?P<project>([\w]+))\.org:(?P<articles>\s(.*))')
matches = usageRe.search(use)
if matches:
if (matches.group('lang')):