Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/285001

Change subject: [bugfix] fix regex
......................................................................

[bugfix] fix regex

https://de.wikipedia.org/w/index.php?diff=153708262

Change-Id: Ia5831ecc2707c5fc6678235c7f01751c88c289a9
---
M checkvotes.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/xqbot 
refs/changes/01/285001/1

diff --git a/checkvotes.py b/checkvotes.py
index c1a1a69..3104295 100644
--- a/checkvotes.py
+++ b/checkvotes.py
@@ -377,25 +377,25 @@
                     if text.count('\n#') == 1:
                         text = pywikibot.replaceExcept(
                             text,
-                            
r'\r?\n#(?!:).*?(?:\[http:.+?\])?[^#:]*?(?:<.+?>)?\[\[(?:[B|b]enutzer(?:in)?:|[U|u]ser:|BD:|Spezial:Beiträge/)%s
 *(?:/[^/\]])?[\||\]][^\r\n]*(?:[\r]*\n)?'
+                            
r'\r?\n#(?!:).*?(?:\[http:.+?\])?[^#:]*?(?:<.+?>)?\[\[(?:[Bb]enutzer(?:in)?:|[U|u]ser:|BD:|Spezial:Beiträge/)%s
 *(?:/[^/\]])?[\||\]][^\r\n]*(?:[\r]*\n)?'
                             % regUsername,
                             r'\n', [])
                         if old == text:
                             text = pywikibot.replaceExcept(
                                 text,
-                                
r'\r?\n#(?!:).*?(?:<.+?>)?\[\[(?:[B|b]enutzer(?:in)?[ _]Diskussion:|[U|u]ser[ 
_]talk:|BD:|Spezial:Beiträge/)%s *(?:/[^/\]])?[\||\]][^\r\n]*(?:[\r]*\n)?'
+                                
r'\r?\n#(?!:).*?(?:<.+?>)?\[\[(?:[Bb]enutzer(?:in)?[ _]Diskussion:|[Uu]ser[ 
_]talk:|BD:|Spezial:Beiträge/)%s *(?:/[^/\]])?[\||\]][^\r\n]*(?:[\r]*\n)?'
                                 % regUsername,
                                 r'\n', [])
                     else:
                         text = pywikibot.replaceExcept(
                             text,
-                            
r'\r?\n#(?!:).*?(?:\[http:.+?\])?[^#:]*?(?:<.+?>)?\[\[(?:[B|b]enutzer(?:in)?:|[U|u]ser:|BD:|Spezial:Beiträge/)%s(?:/[^/\]])?[\||\]][^\r\n]*?(?:\r?\n#[#:]+.*?)*\r?\n#([^#:]+?)'
+                            
r'\r?\n#(?!:).*?(?:\[http:.+?\])?[^#:]*?(?:<.+?>)?\[\[(?:[Bb]enutzer(?:in)?:|[Uu]ser:|BD:|Spezial:Beiträge/)%s(?:/[^/\]])?[\||\]][^\r\n]*(?:\r?\n#[#:]+.*?)*\r?\n#([^#:]+?)'
                             % regUsername,
                             r'\n#\1', [])
                         if old == text:
                             text = pywikibot.replaceExcept(
                                 text,
-                                
r'\r?\n#(?!:).*?(?:\[http:.+?\])?[^#:]*?(?:<.+?>)?\[\[(?:[B|b]enutzer(?:in)?[ 
_]Diskussion|[U|u]ser[ 
_]talk):%s[\||\]][^\r\n]*?(?:\r?\n#[#:]+.*?)*(?:\r?\n)+#([^#:]+?)'
+                                
r'\r?\n#(?!:).*?(?:\[http:.+?\])?[^#:]*?(?:<.+?>)?\[\[(?:[Bb]enutzer(?:in)?[ 
_]Diskussion|[Uu]ser[ 
_]talk):%s[\||\]][^\r\n]*(?:\r?\n#[#:]+.*?)*(?:\r?\n)+#([^#:]+?)'
                                 % regUsername,
                                 r'\n#\1', [])
                     comment = ', abgelaufene Stimmen entfernt.'

-- 
To view, visit https://gerrit.wikimedia.org/r/285001
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5831ecc2707c5fc6678235c7f01751c88c289a9
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/xqbot
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to