]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
plugin(imdb): fix title regex, closes #44
authorMatthias Hecker <mail@apoc.cc>
Sat, 25 Apr 2020 18:52:25 +0000 (20:52 +0200)
committerMatthias Hecker <mail@apoc.cc>
Sat, 25 Apr 2020 18:52:25 +0000 (20:52 +0200)
data/rbot/plugins/imdb.rb

index 0f5c6024b6306ddcd73079500208dde7a02dbf55..3ca2103572ec3046242bb8cadaafbe73d20e82f1 100644 (file)
@@ -150,7 +150,7 @@ class Imdb
       debug title_date
       # note that the date dash for series is a - (ndash), not a - (minus sign)
       # also, the second date, if missing, is an no-break space
-      pre_title, extra, date, junk = title_date.scan(/^(.*)\((.+?\s+)?(\d\d\d\d(?:–(?:\d\d\d\d| )?)?(?:\/[IV]+)?)\)\s*(.+)?$/).first
+      pre_title, extra, date, junk = title_date.scan(/^(.*)\((.+?\s+)?(\d\d\d\d(?:–(?:\d\d\d\d| )?)?(?:\/[IV]+)?)[^\)]*\)\s*(.+)?$/).first
       extra.strip! if extra
       pre_title.strip!
       title = fix_article(pre_title)