http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10305
Revision: 10305 Author: xqt Date: 2012-06-07 09:19:05 +0000 (Thu, 07 Jun 2012) Log Message: ----------- ip_regexp matchs ip6
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2012-06-07 03:21:48 UTC (rev 10304) +++ branches/rewrite/pywikibot/page.py 2012-06-07 09:19:05 UTC (rev 10305) @@ -1842,9 +1842,15 @@ return sorted(list(set(self.categories())))
-ip_regexp = re.compile(r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}' \ - r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$') +ip_regexp = re.compile(r'^(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}' + r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|' + r'(((?=(?=(.*?(::)))\3(?!.+\4)))\4?|[\dA-F]{1,4}:)' + r'([\dA-F]{1,4}(\4|:\b)|\2){5}' + r'(([\dA-F]{1,4}(\4|:\b|$)|\2){2}|' + r'(((2[0-4]|1\d|[1-9])?\d|25[0-5]).?\b){4}))\Z', + re.IGNORECASE)
+ class User(Page): """A class that represents a Wiki user. """